From 9bc4ffceedef056e111971513bb9d76bbfd01efc Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 31 Dec 2011 14:40:37 -0200 Subject: Updating rsync example --- examples/example.rsync | 107 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 98 insertions(+), 9 deletions(-) (limited to 'examples/example.rsync') diff --git a/examples/example.rsync b/examples/example.rsync index 3c280ba..6e565c8 100644 --- a/examples/example.rsync +++ b/examples/example.rsync @@ -18,6 +18,12 @@ # (see below) is set to 'yes' #partition = +# set to 1 if fsck should run on partition after the backup is made +#fscheck = + +# set to 1 if partition is mounted read-only +#read_only = + # backup partition mountpoint or backup main folder # this doesn't need to be a real partition, but should be at least the # main folder where the backup is being stored @@ -26,14 +32,23 @@ mountpoint = /mnt/backup # folder relative do mountpoint where the backup should be stored backupdir = myserver -# number of backup increments (min = 5) -days = 7 +# temp folder +#tmp = /tmp + +# specify backup storage format: short, long or mirror (i.e, no rotations) +format = short -# set to 1 if fsck should run on partition after the backup is made -#fscheck = +# for short storage format, specify the number of backup increments (min = 2, set to 1 or less to disable) +days = 7 -# set to 1 if $partition is mounted read-only -#read_only = +# for long storage format, specify the number of daily backup increments +#keepdaily = 7 + +# for long storage format, specify the number of weekly backup increments +#keepweekly = 3 + +# for long storage format, specify the number of monthly backup increments +#keepmonthly = 1 # use this if you need a lockfile to be kept during backup execution # this is an useful feature in case you have some tasks that should @@ -49,6 +64,9 @@ days = 7 # temp folder #tmp = /tmp +# set to "yes" if you want to use multiconnection ssh support +#multiconnection = no + [source] # where the data to be backed up is (local or remote) @@ -57,6 +75,12 @@ days = 7 # if remote source, specify the hostname or IP #host = +# remote port number (remote source only) +#port = 22 + +# remote user name (remote source only) +#user = + # when "yes", test the connection for a remote source before backup #testconnect = no @@ -76,15 +100,18 @@ exclude_vserver = excluded_vserver2 # ssh command line (remote only) #ssh = ssh +# ssh or rsync (remote source only) +#protocol = ssh + # rsync program # it defaults to $RSYNC value from backupninja.conf #rsync = $RSYNC # rsync command options -#rsync_options = "-av --delete" +#rsync_options = "-av --delete --recursive" # when set to 1, use numeric ids instead of user/group mappings on rsync -#numericids = 0 +#numericids = # if set to 1, compress data on rsync (remote source only) #compress = 0 @@ -95,13 +122,75 @@ exclude_vserver = excluded_vserver2 # remote rsync program (remote source only) #remote_rsync = rsync +# ssh key file (remote source only) +#id_file = /root/.ssh/id_dsa + +# set to "yes" to rsync use a batch file as source +#batch = no + +# folder where the batch file is located +#batchbase = + +# set yes if you want rsync to use a file list source +#filelist = no + +# folder where the file list is placed +#filelistbase = + +[dest] + +# backup destination type (local or remote) +#dest = local + +# when "yes", test the connection for a remote source before backup +#testconnect = no + +# ssh command line (remote dest only) +#ssh = ssh + +# ssh or rsync (remote dest only) +#protocol = ssh + +# when set to 1, use numeric ids instead of user/group mappings on rsync +#numericids = + +# if set to 1, compress data on rsync (remote source only) +#compress = 0 + +# destination host name (remote destination only) +#host = + +# remote port number (remote destination only) +#port = 22 + +# remote user name (remote destination only) +#user = + +# ssh key file (remote destination only) +#id_file = /root/.ssh/id_dsa + +# set a badnwidth limit in KB/s (remote destination only) +#bandwidthlimit = 1024 + +# remote rsync program (remote dest only) +#remote_rsync = rsync + +# set to "yes" to rsync write a batch file from the changes +#batch = no + +# folder where the batch file should be written +#batchbase = /var/backups/rsync/batches + +# set to yes so rsync use the --fake-super flag (remote destination only) +#fakesuper = yes + # This section is used to stop and start services that should be turned of # during the backup procedure. # #[services] # # absolute path where scripts are located -#initscripts = +#initscripts = /etc/init.d # # script name to be stoped at the begining of the backup and started at its end #service = -- cgit v1.2.3 From 7c4d7e4dbed3c3417a78c59a7c0cb0d0c3108da3 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 31 Dec 2011 14:43:01 -0200 Subject: Remove default value from rsync example --- examples/example.rsync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/example.rsync') diff --git a/examples/example.rsync b/examples/example.rsync index 6e565c8..3ac3975 100644 --- a/examples/example.rsync +++ b/examples/example.rsync @@ -170,7 +170,7 @@ exclude_vserver = excluded_vserver2 #id_file = /root/.ssh/id_dsa # set a badnwidth limit in KB/s (remote destination only) -#bandwidthlimit = 1024 +#bandwidthlimit = # remote rsync program (remote dest only) #remote_rsync = rsync -- cgit v1.2.3 From a74db16e51a057d665f7d8ee35733ffce12a4717 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sat, 25 Feb 2012 14:01:49 +0100 Subject: Fix typos. --- examples/example.rsync | 4 ++-- handlers/rsync.in | 4 ++-- handlers/wget | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'examples/example.rsync') diff --git a/examples/example.rsync b/examples/example.rsync index 3ac3975..a2795db 100644 --- a/examples/example.rsync +++ b/examples/example.rsync @@ -116,7 +116,7 @@ exclude_vserver = excluded_vserver2 # if set to 1, compress data on rsync (remote source only) #compress = 0 -# set a badnwidth limit in KB/s (remote source only) +# set a bandwidth limit in KB/s (remote source only) #bandwidthlimit = # remote rsync program (remote source only) @@ -169,7 +169,7 @@ exclude_vserver = excluded_vserver2 # ssh key file (remote destination only) #id_file = /root/.ssh/id_dsa -# set a badnwidth limit in KB/s (remote destination only) +# set a bandwidth limit in KB/s (remote destination only) #bandwidthlimit = # remote rsync program (remote dest only) diff --git a/handlers/rsync.in b/handlers/rsync.in index e46f866..ba2b9b5 100644 --- a/handlers/rsync.in +++ b/handlers/rsync.in @@ -60,7 +60,7 @@ # exclude_vserver = vserver-name (valid only if vservers = yes on backupninja.conf) # numericids = when set to 1, use numeric ids instead of user/group mappings on rsync # compress = if set to 1, compress data on rsync (remote source only) -# bandwidthlimit = set a badnwidth limit in KB/s (remote source only) +# bandwidthlimit = set a bandwidth limit in KB/s (remote source only) # remote_rsync = remote rsync program (remote source only) # id_file = ssh key file (remote source only) # batch = set to "yes" to rsync use a batch file as source @@ -79,7 +79,7 @@ # port = remote port number (remote destination only) # user = remote user name (remote destination only) # id_file = ssh key file (remote destination only) -# bandwidthlimit = set a badnwidth limit in KB/s (remote destination only) +# bandwidthlimit = set a bandwidth limit in KB/s (remote destination only) # remote_rsync = remote rsync program (remote dest only) # batch = set to "yes" to rsync write a batch file from the changes # batchbase = folder where the batch file should be written diff --git a/handlers/wget b/handlers/wget index 67425fc..79aa22c 100644 --- a/handlers/wget +++ b/handlers/wget @@ -26,7 +26,7 @@ # wget = wget program # wget_options = wget command options # url = remote data url -# bandwidthlimit = set a badnwidth limit in kbps (remote source only) +# bandwidthlimit = set a bandwidth limit in kbps (remote source only) # # [destination] # folder = local folder @@ -182,8 +182,8 @@ echo "Rotating $backupdir/$folder/$folder..." >> $log rotate $backupdir/$folder/$folder $keep info "Wget'ing $SECTION on $backupdir/$folder/$folder.0..." -if [ ! -z "$badnwidth" ]; then - limit_rate="--limit-rate=$badnwidth""k" +if [ ! -z "$bandwidth" ]; then + limit_rate="--limit-rate=$bandwidth""k" fi cd $backupdir/$folder/$folder.0 -- cgit v1.2.3 From a99421620f829c039324b71c88460eaf20c94c7c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 10 May 2012 17:34:15 -0300 Subject: Removing lockfile from rsync example (#3838) --- examples/example.rsync | 5 ----- 1 file changed, 5 deletions(-) (limited to 'examples/example.rsync') diff --git a/examples/example.rsync b/examples/example.rsync index a2795db..faba203 100644 --- a/examples/example.rsync +++ b/examples/example.rsync @@ -50,11 +50,6 @@ days = 7 # for long storage format, specify the number of monthly backup increments #keepmonthly = 1 -# use this if you need a lockfile to be kept during backup execution -# this is an useful feature in case you have some tasks that should -# know if the backup is running or not -#lockfile = - # rsync command nice level #nicelevel = 0 -- cgit v1.2.3 From 461275fa4d537c80a0c28dd77a4620581fcf0324 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 10 May 2012 17:59:24 -0300 Subject: Documenting rotation parameters at example.rsync (#3891) --- examples/example.rsync | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'examples/example.rsync') diff --git a/examples/example.rsync b/examples/example.rsync index a2795db..2b5eaa1 100644 --- a/examples/example.rsync +++ b/examples/example.rsync @@ -36,9 +36,33 @@ backupdir = myserver #tmp = /tmp # specify backup storage format: short, long or mirror (i.e, no rotations) +# +# In the short format, incremental backups are rotated every day the handler +# runs an by a finite number of times (backup.0, backup.1, backup.1, etc), so +# if you want to have incremental backups for longer periods (like months) you +# have to configure rotations for 30 or more using the "days" parameter at the +# [general] section in the handler config. +# +# The short format is better described here: +# http://www.mikerubel.org/computers/rsync_snapshots/#Incremental +# +# The long format is inspired by the maildir handler and allows keeping backups +# of longer periods (weeks and months) using less rotations as it stores +# the increments in folders like daily.1, weekly.1, monthly.1 and has three +# rotation parameters: +# +# keepdaily = number of daily backup increments +# keepweekly = number of weekly backup increments +# keepmonthly = number of monthly backup increments +# format = short # for short storage format, specify the number of backup increments (min = 2, set to 1 or less to disable) +# +# Note that setting days = 0 is almost the same as using format = mirror except +# that with the days config your backup gets a .0 suffix at the destination +# folder, making it easier to turn it later to an incremental backup. +# days = 7 # for long storage format, specify the number of daily backup increments -- cgit v1.2.3