You've already forked Borgbackup-Schedule
Inital Commit
This commit is contained in:
81
root/etc/borgbackup/config
Normal file
81
root/etc/borgbackup/config
Normal file
@@ -0,0 +1,81 @@
|
||||
# Borgbackup Configuration File
|
||||
|
||||
# --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- #
|
||||
|
||||
# Run Borgbackup every 6 hours.
|
||||
#
|
||||
TIMER='false'
|
||||
|
||||
# Set the repository location.
|
||||
#
|
||||
BORG_REPO=''
|
||||
|
||||
# --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- #
|
||||
|
||||
# Select compression algorithm.
|
||||
# none - No Compression
|
||||
# lz4 - Low Compression
|
||||
# auto,lz4 - Low Compression of compressible data
|
||||
# zlib - High Compression
|
||||
# auto,zlib - High Compression of compressible data
|
||||
# lzma,N - Very High Compression
|
||||
# auto,lzma,N - Very High Compression of compressible data
|
||||
#
|
||||
BORG_COMPRESSION='auto,zlib'
|
||||
|
||||
# --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- #
|
||||
|
||||
# Keep all archives within this time interval.
|
||||
#
|
||||
BORG_PRUNE_WITHIN='1d'
|
||||
|
||||
# Keep number of daily archives.
|
||||
#
|
||||
BORG_PRUNE_DAILY='7'
|
||||
|
||||
# Keep number of weekly archives.
|
||||
#
|
||||
BORG_PRUNE_WEEKLY='4'
|
||||
|
||||
# Keep number of monthly archives.
|
||||
#
|
||||
BORG_PRUNE_MONTHLY='3'
|
||||
|
||||
# --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- #
|
||||
|
||||
# A numeric value, this determines the maximum "time to live" for the
|
||||
# files cache entries.
|
||||
#
|
||||
BORG_FILES_CACHE_TTL='7'
|
||||
|
||||
# When set, system information (like OS, Python version, …) in exceptions
|
||||
# is shown.
|
||||
#
|
||||
BORG_SHOW_SYSINFO='no'
|
||||
|
||||
# A list of comma separated strings that trigger workarounds in borg, e.g.
|
||||
# to work around bugs in other software.
|
||||
#
|
||||
# basesyncfile - Use the more simple BaseSyncFile code to
|
||||
# avoid issues with sync_file_range. You might
|
||||
# need this to run borg on WSL (Windows
|
||||
# Subsystem for Linux) or in systemd.nspawn
|
||||
# containers on some architectures (e.g. ARM).
|
||||
# Using this does not affect data safety, but
|
||||
# might result in a more bursty write to disk
|
||||
# behaviour (not continuously
|
||||
# streaming to disk).
|
||||
#
|
||||
# retry_erofs - Retry opening a file without O_NOATIME if
|
||||
# opening a file with O_NOATIME caused EROFS.
|
||||
# You will need this to make archives from
|
||||
# volume shadow copies in WSL1
|
||||
# (Windows Subsystem for Linux 1).
|
||||
#
|
||||
# authenticated_no_key - Work around a lost passphrase or key for an
|
||||
# authenticated mode repository (these are only
|
||||
# authenticated, but not encrypted). If the key
|
||||
# is missing in the repository config, add
|
||||
# key = anything there.
|
||||
#
|
||||
BORG_WORKAROUNDS=''
|
||||
9
root/etc/borgbackup/exclude
Normal file
9
root/etc/borgbackup/exclude
Normal file
@@ -0,0 +1,9 @@
|
||||
# Borgbackup Exclusion List
|
||||
# Defines which data are not included in the backup.
|
||||
/dev/*
|
||||
/lost+found/*
|
||||
/proc/*
|
||||
/run/*
|
||||
/sys/*
|
||||
/tmp/*
|
||||
/var/tmp/*
|
||||
17
root/etc/cron.d/borgbackup
Normal file
17
root/etc/cron.d/borgbackup
Normal file
@@ -0,0 +1,17 @@
|
||||
# /etc/cron.d/borgbackup
|
||||
|
||||
SHELL=/bin/sh
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
MAILTO=root
|
||||
|
||||
# * * * * * user command to execute
|
||||
# | | | | |
|
||||
# | | | | |
|
||||
# | | | | |_______________ day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
|
||||
# | | | |______________________ month (1 - 12)
|
||||
# | | |_____________________________ day of month (1 - 31)
|
||||
# | |____________________________________ hour (0 - 23)
|
||||
# |___________________________________________ min (0 - 59)
|
||||
#
|
||||
0 */6 * * * root if [ -d '/run/systemd/system' ]; then exit 0; fi; if ! '/usr/lib/borgbackup/check_condition'; then exit 1; fi; '/usr/lib/borgbackup/start_backup';
|
||||
#
|
||||
74
root/etc/logrotate.d/borgbackup
Normal file
74
root/etc/logrotate.d/borgbackup
Normal file
@@ -0,0 +1,74 @@
|
||||
/var/log/borgbackup/*.log {
|
||||
# Truncate the original log file in place after creating a copy,
|
||||
# instead of moving the old log file and optionally creating a
|
||||
# new one. It can be used when some program cannot be told to
|
||||
# close its logfile and thus might continue writing (appending)
|
||||
# to the previous log file forever. Note that there is a very
|
||||
# small time slice between copying the file and truncating it, so
|
||||
# some logging data might be lost. When this option is used, the
|
||||
# create option will have no effect, as the old log file stays in
|
||||
# place.
|
||||
copytruncate
|
||||
|
||||
# Archive old versions of log files adding a daily extension like
|
||||
# YYYYMMDD instead of simply adding a number. The extension may
|
||||
# be configured using the dateformat option.
|
||||
dateext
|
||||
|
||||
# Specify the extension for dateext using the notation similar to
|
||||
# strftime(3) function. Only %Y %m %d and %s specifiers are allowed.
|
||||
# The default value is -%Y%m%d. Note that also the character
|
||||
# separating log name from the extension is part of the dateformat
|
||||
# string. The system clock must be set past Sep 9th 2001 for %s to
|
||||
# work correctly. Note that the datestamps generated by this format
|
||||
# must be lexically sortable (i.e., first the year, then the month
|
||||
# then the day. e.g., 2001/12/01 is ok, but 01/12/2001 is not, since
|
||||
# 01/11/2002 would sort lower while it is later). This is because when
|
||||
# using the rotate option, logrotate sorts all rotated filenames to
|
||||
# find out which logfiles are older and should be removed.
|
||||
dateformat .%Y-%m-%d
|
||||
|
||||
# Use yesterday's instead of today's date to create the dateext
|
||||
# extension, so that the rotated log file has a date in its name that
|
||||
# is the same as the timestamps within it.
|
||||
dateyesterday
|
||||
|
||||
# Postpone compression of the previous log file to the next rotation
|
||||
# cycle. This only has effect when used in combination with compress.
|
||||
# It can be used when some program cannot be told to close its logfile
|
||||
# and thus might continue writing to the previous log file for some time.
|
||||
delaycompress
|
||||
|
||||
# Do not copy the original log file and leave it in place.
|
||||
nocopy
|
||||
|
||||
# New log files are not created.
|
||||
nocreate
|
||||
|
||||
# Don't mail old log files to any address.
|
||||
nomail
|
||||
|
||||
# Do not use shred when deleting old log files.
|
||||
noshred
|
||||
|
||||
# Do not rotate the log if it is empty.
|
||||
notifempty
|
||||
|
||||
# Logs are moved into directory for rotation. The directory must be on the
|
||||
# same physical device as the log file being rotated, and is assumed to be
|
||||
# relative to the directory holding the log file unless an absolute path
|
||||
# name is specified. When this option is used all old versions of the log
|
||||
# end up in directory.
|
||||
olddir /var/logrotate/borgbackup
|
||||
|
||||
# Log files are rotated count times before being removed or mailed to the
|
||||
# address specified in a mail directive. If count is 0, old versions are
|
||||
# removed rather than rotated.
|
||||
rotate 12
|
||||
|
||||
# Log files are rotated if the current weekday is less than the weekday of
|
||||
# the last rotation or if more than a week has passed since the last
|
||||
# rotation. This is normally the same as rotating logs on the first day of
|
||||
# the week, but it works better if logrotate is not run every night.
|
||||
weekly
|
||||
}
|
||||
Reference in New Issue
Block a user