From abf7a4bb651c5ec85306fca96a572dfc8a424edb Mon Sep 17 00:00:00 2001 From: Olivier Berger Date: Sun, 2 May 2010 17:40:50 +0200 Subject: Implement Debian #535996 to use --full-if-older-than --- handlers/dup.helper.in | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'handlers/dup.helper.in') diff --git a/handlers/dup.helper.in b/handlers/dup.helper.in index 8b344dc..4ac33d7 100644 --- a/handlers/dup.helper.in +++ b/handlers/dup.helper.in @@ -123,6 +123,7 @@ do_dup_dest() { formItem "destdir" "$dup_destdir" formItem "keep" "$dup_keep" formItem "incremental" "$dup_incremental" + formItem "increments" "$dup_increments" formItem "bandwidthlimit" "$dup_bandwidth" formItem "sshoptions" "$dup_sshoptions" formDisplay @@ -139,8 +140,9 @@ do_dup_dest() { dup_destdir=${thereply[2]} dup_keep=${thereply[3]} dup_incremental=${thereply[4]} - dup_bandwidth=${thereply[5]} - dup_sshoptions=${thereply[6]} + dup_increments=${thereply[5]} + dup_bandwidth=${thereply[6]} + dup_sshoptions=${thereply[7]} done set +o noglob @@ -406,6 +408,14 @@ EOF # if incremental = no, perform a full backup in order to start a new backup set incremental = $dup_incremental +# how many days of incremental backups before doing a full backup again ; default is 30 days. +# (you can also use the time format of duplicity) +# if 'increments = keep' is set : do not start another full backup, +# but keep doing incremental backups +#increments = 30 +#increments = keep +increments = $dup_increments + # how many days of data to keep ; default is 60 days. # (you can also use the time format of duplicity) # 'keep = yes' means : do not delete old data, the remote host will take care of this @@ -510,6 +520,7 @@ dup_wizard() { dup_excludes= dup_vsincludes= dup_incremental=yes + dup_increments=30 dup_keep=60 dup_bandwidth= dup_sshoptions= -- cgit v1.2.3 From e0981ba3f0982c15a66395158954c4b2528834b3 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 6 May 2010 18:49:18 +0200 Subject: Rephrase, reformat and sync example dup configuration. --- examples/example.dup | 8 ++++++++ handlers/dup.helper.in | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'handlers/dup.helper.in') diff --git a/examples/example.dup b/examples/example.dup index ea4d66e..53039f5 100644 --- a/examples/example.dup +++ b/examples/example.dup @@ -147,6 +147,14 @@ exclude = /home/*/.gnupg ## Default: # incremental = yes +## how many days of incremental backups before doing a full backup again ; +## default is 30 days (one can also use the time format of duplicity). +## if increments = keep, never automatically perform a new full backup ; +## only perform incremental backups. +## +## Default: +# increments = 30 + ## how many days of data to keep ; default is 60 days. ## (you can also use the time format of duplicity) ## 'keep = yes' means : do not delete old data, the remote host will take care of this diff --git a/handlers/dup.helper.in b/handlers/dup.helper.in index 4ac33d7..47f4469 100644 --- a/handlers/dup.helper.in +++ b/handlers/dup.helper.in @@ -408,10 +408,10 @@ EOF # if incremental = no, perform a full backup in order to start a new backup set incremental = $dup_incremental -# how many days of incremental backups before doing a full backup again ; default is 30 days. -# (you can also use the time format of duplicity) -# if 'increments = keep' is set : do not start another full backup, -# but keep doing incremental backups +# how many days of incremental backups before doing a full backup again ; +# default is 30 days (one can also use the time format of duplicity). +# if increments = keep, never automatically perform a new full backup ; +# only perform incremental backups. #increments = 30 #increments = keep increments = $dup_increments -- cgit v1.2.3 From 219a6eb958a6f8cc9dce34f9f87a95c02ef0c322 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 6 May 2010 19:47:54 +0200 Subject: Better example.dup documentation. Thanks, Alster! --- ChangeLog | 1 + examples/example.dup | 24 +++++++++++++++--------- handlers/dup.helper.in | 17 +++++++++++++---- 3 files changed, 29 insertions(+), 13 deletions(-) (limited to 'handlers/dup.helper.in') diff --git a/ChangeLog b/ChangeLog index 3dfbed8..cfa0959 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ version 0.9.8 -- UNRELEASED . Put archive directory (cache) into /var/backups/duplicity rather than the default /root/.cache/duplicity, unless the user has specified it (Closes: 580213) + . Better example.dup documentation. Thanks, Alster! version 0.9.7 -- January 27, 2010 backupninja changes diff --git a/examples/example.dup b/examples/example.dup index 53039f5..2c0c41d 100644 --- a/examples/example.dup +++ b/examples/example.dup @@ -19,7 +19,8 @@ ## Default: # nicelevel = 0 -## test the connection? set to no to skip the test if the remote host is alive +## test the connection? set to no to skip the test if the remote host is alive. +## if 'desturl' is set below, 'testconnect' must be set to 'no' for now. ## ## Default: # testconnect = yes @@ -169,6 +170,7 @@ exclude = /home/*/.gnupg ## desturl = file:///usr/local/backup ## desturl = rsync://user@other.host//var/backup/bla ## desturl = s3+http:// +## desturl = ftp://myftpuser[:myftppassword]@ftp.example.org/remote/ftp/path ## the default value of this configuration option is not set: ## ## Default: @@ -183,8 +185,9 @@ exclude = /home/*/.gnupg # awsaccesskeyid = # awssecretaccesskey = -## bandwith limit, in kbit/s ; default is 0, i.e. no limit an example -## setting would be: +## bandwith limit, in kbit/s ; default is 0, i.e. no limit +## if using 'desturl' above, 'bandwidthlimit' must not be set +## an example setting of 128 kbps would be: ## bandwidthlimit = 128 ## ## Default: @@ -199,14 +202,18 @@ exclude = /home/*/.gnupg ## Default: # sshoptions = -## put the backups under this directory, this must be set! +## put the backups under this destination directory +## if using 'desturl' above, this must not be set +## in all other cases, this must be set! ## an example setting would be: ## destdir = /backups ## ## Default: # destdir = -## the machine which will receive the backups, this must be set! +## the machine which will receive the backups +## if using 'desturl' above, this must not be set +## in all other cases, this must be set! ## an example setting would be: ## desthost = backuphost ## @@ -214,12 +221,11 @@ exclude = /home/*/.gnupg # desthost = ## make the files owned by this user -## note: you must be able to ssh backupuser@backhost -## without specifying a password (if type = remote). +## if using 'desturl' above, this must not be set +## note: if using an SSH based transport and 'type' is set to 'remote', you must +## be able to 'ssh backupuser@backuphost' without specifying a password. ## an example setting would be: ## destuser = backupuser ## ## Default: # destuser = - - diff --git a/handlers/dup.helper.in b/handlers/dup.helper.in index 47f4469..a47064d 100644 --- a/handlers/dup.helper.in +++ b/handlers/dup.helper.in @@ -280,7 +280,8 @@ options = $dup_options # default is 0, but set to 19 if you want to lower the priority. nicelevel = $dup_nicelevel -# default is yes. set to no to skip the test if the remote host is alive +# default is yes. set to no to skip the test if the remote host is alive. +# if 'desturl' is set below, 'testconnect' must be set to 'no' for now. testconnect = $dup_testconnect ###################################################### @@ -429,6 +430,7 @@ keep = $dup_keep #desturl = file:///usr/local/backup #desturl = rsync://user@other.host//var/backup/bla #desturl = s3+http://your_bucket +#desturl = ftp://myftpuser[:myftppassword]@ftp.example.org/remote/ftp/path # Amazon Web Services Access Key ID and Secret Access Key, needed for backups # to S3 buckets. @@ -436,6 +438,8 @@ keep = $dup_keep #awssecretaccesskey = YOUR_AWS_SECRET_KEY # bandwith limit, in kbit/s ; default is 0, i.e. no limit +# if using 'desturl' above, 'bandwidthlimit' must not be set +# an example setting of 128 kbps would be: #bandwidthlimit = 128 bandwidthlimit = $dup_bandwidth @@ -445,15 +449,20 @@ bandwidthlimit = $dup_bandwidth #sshoptions = -o IdentityFile=/root/.ssh/id_dsa_duplicity sshoptions = $dup_sshoptions -# put the backups under this directory +# put the backups under this destination directory +# if using 'desturl' above, this must not be set +# in all other cases, this must be set! destdir = $dup_destdir # the machine which will receive the backups +# if using 'desturl' above, this must not be set +# in all other cases, this must be set! desthost = $dup_desthost # make the files owned by this user -# note: you must be able to ssh backupuser@backhost -# without specifying a password (if type = remote). +# if using 'desturl' above, this must not be set +# note: if using an SSH based transport and 'type' is set to 'remote', you must +# be able to 'ssh backupuser@backuphost' without specifying a password. destuser = $dup_destuser EOF -- cgit v1.2.3 From 99434c8b07f29fd45d1db55b30b5820a47d5a1ab Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 6 May 2010 20:05:20 +0200 Subject: Added ftp_password option. This is the only way to securely transmit the FTP password from backupninja to duplicity. --- ChangeLog | 2 ++ examples/example.dup | 7 ++++++- handlers/dup.helper.in | 5 ++++- handlers/dup.in | 7 +++++++ 4 files changed, 19 insertions(+), 2 deletions(-) (limited to 'handlers/dup.helper.in') diff --git a/ChangeLog b/ChangeLog index cfa0959..26cac5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,8 @@ version 0.9.8 -- UNRELEASED than the default /root/.cache/duplicity, unless the user has specified it (Closes: 580213) . Better example.dup documentation. Thanks, Alster! + . Added ftp_password option to securely transmit the FTP password + from backupninja to duplicity. version 0.9.7 -- January 27, 2010 backupninja changes diff --git a/examples/example.dup b/examples/example.dup index 2c0c41d..f260d3a 100644 --- a/examples/example.dup +++ b/examples/example.dup @@ -170,7 +170,7 @@ exclude = /home/*/.gnupg ## desturl = file:///usr/local/backup ## desturl = rsync://user@other.host//var/backup/bla ## desturl = s3+http:// -## desturl = ftp://myftpuser[:myftppassword]@ftp.example.org/remote/ftp/path +## desturl = ftp://myftpuser@ftp.example.org/remote/ftp/path ## the default value of this configuration option is not set: ## ## Default: @@ -185,6 +185,11 @@ exclude = /home/*/.gnupg # awsaccesskeyid = # awssecretaccesskey = +## FTP password, needed for backups using desturl = ftp://... +## +## Default: +# ftp_password = + ## bandwith limit, in kbit/s ; default is 0, i.e. no limit ## if using 'desturl' above, 'bandwidthlimit' must not be set ## an example setting of 128 kbps would be: diff --git a/handlers/dup.helper.in b/handlers/dup.helper.in index a47064d..ea27844 100644 --- a/handlers/dup.helper.in +++ b/handlers/dup.helper.in @@ -430,13 +430,16 @@ keep = $dup_keep #desturl = file:///usr/local/backup #desturl = rsync://user@other.host//var/backup/bla #desturl = s3+http://your_bucket -#desturl = ftp://myftpuser[:myftppassword]@ftp.example.org/remote/ftp/path +#desturl = ftp://myftpuser@ftp.example.org/remote/ftp/path # Amazon Web Services Access Key ID and Secret Access Key, needed for backups # to S3 buckets. #awsaccesskeyid = YOUR_AWS_ACCESS_KEY_ID #awssecretaccesskey = YOUR_AWS_SECRET_KEY +# FTP password, needed for backups using desturl = ftp://... +#ftp_password = + # bandwith limit, in kbit/s ; default is 0, i.e. no limit # if using 'desturl' above, 'bandwidthlimit' must not be set # an example setting of 128 kbps would be: diff --git a/handlers/dup.in b/handlers/dup.in index b881b0a..4e0bbcf 100644 --- a/handlers/dup.in +++ b/handlers/dup.in @@ -29,6 +29,7 @@ getconf keep 60 getconf desturl getconf awsaccesskeyid getconf awssecretaccesskey +getconf ftp_password getconf sshoptions getconf bandwidthlimit 0 getconf desthost @@ -44,6 +45,9 @@ destdir=${destdir%/} if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "s3+http" ]; then [ -n "$awsaccesskeyid" -a -n "$awssecretaccesskey" ] || fatal "AWS access keys must be set for S3 backups." fi +if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "ftp" ]; then + [ -n "$ftp_password" ] || fatal "ftp_password must be set for FTP backups." +fi ### VServers # If vservers are configured, check that the ones listed in $vsnames do exist. @@ -269,6 +273,7 @@ if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 4 -a "$duplicity_sub" -g debug "$precmd duplicity cleanup --force $execstr_options $execstr_serverpart" if [ ! $test ]; then export PASSPHRASE=$password + export FTP_PASSWORD=$ftp_password output=`nice -n $nicelevel \ su -c \ "$precmd duplicity cleanup --force $execstr_options $execstr_serverpart 2>&1"` @@ -289,6 +294,7 @@ if [ "$keep" != "yes" ]; then debug "$precmd duplicity remove-older-than $keep --force $execstr_options $execstr_serverpart" if [ ! $test ]; then export PASSPHRASE=$password + export FTP_PASSWORD=$ftp_password output=`nice -n $nicelevel \ su -c \ "$precmd duplicity remove-older-than $keep --force $execstr_options $execstr_serverpart 2>&1"` @@ -309,6 +315,7 @@ debug "$precmd duplicity $execstr_command $execstr_options $execstr_source --exc if [ ! $test ]; then outputfile=`maketemp backupout` export PASSPHRASE=$password + export FTP_PASSWORD=$ftp_password output=`nice -n $nicelevel \ su -c \ "$precmd duplicity $execstr_command $execstr_options $execstr_source --exclude '**' / $execstr_serverpart >$outputfile 2>&1"` -- cgit v1.2.3 From 46ace6557309f85a7efeb0b877225053c5bb1552 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Mon, 10 May 2010 22:18:49 +0200 Subject: Added /var/cache/backupninja/duplicity to default excludes. ... for rdiff.helper, dup.helper, example.dup and example.rdiff. --- examples/example.dup | 1 + examples/example.rdiff | 1 + handlers/dup.helper.in | 2 +- handlers/rdiff.helper.in | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) (limited to 'handlers/dup.helper.in') diff --git a/examples/example.dup b/examples/example.dup index f260d3a..0ed5b2a 100644 --- a/examples/example.dup +++ b/examples/example.dup @@ -135,6 +135,7 @@ include = /var/lib/dpkg/status-old # files to exclude from the backup exclude = /home/*/.gnupg +exclude = /var/cache/backupninja/duplicity ###################################################### ## destination section diff --git a/examples/example.rdiff b/examples/example.rdiff index 08e8869..5adecd8 100644 --- a/examples/example.rdiff +++ b/examples/example.rdiff @@ -122,6 +122,7 @@ include = /var/lib/dpkg/status-old ## files to exclude from the backup exclude = /home/*/.gnupg +exclude = /var/cache/backupninja/duplicity ###################################################### ## destination section diff --git a/handlers/dup.helper.in b/handlers/dup.helper.in index ea27844..e985c5e 100644 --- a/handlers/dup.helper.in +++ b/handlers/dup.helper.in @@ -552,7 +552,7 @@ dup_wizard() { # Global variables whose '*' shall not be expanded set -o noglob dup_default_includes="/var/spool/cron/crontabs /var/backups /etc /root /home /usr/local/*bin /var/lib/dpkg/status*" - dup_default_excludes="/home/*/.gnupg /home/*/.local/share/Trash /home/*/.Trash /home/*/.thumbnails /home/*/.beagle /home/*/.aMule /home/*/gtk-gnutella-downloads" + dup_default_excludes="/home/*/.gnupg /home/*/.local/share/Trash /home/*/.Trash /home/*/.thumbnails /home/*/.beagle /home/*/.aMule /home/*/gtk-gnutella-downloads /var/cache/backupninja/duplicity" set +o noglob dup_main_menu diff --git a/handlers/rdiff.helper.in b/handlers/rdiff.helper.in index e35d629..b5bb8bb 100644 --- a/handlers/rdiff.helper.in +++ b/handlers/rdiff.helper.in @@ -415,7 +415,7 @@ rdiff_wizard() { # Global variables whose '*' shall not be expanded set -o noglob rdiff_includes=(/var/spool/cron/crontabs /var/backups /etc /root /home /usr/local/*bin /var/lib/dpkg/status*) - rdiff_excludes=(/home/*/.gnupg /home/*/.local/share/Trash /home/*/.Trash /home/*/.thumbnails /home/*/.beagle /home/*/.aMule /home/*/gtk-gnutella-downloads) + rdiff_excludes=(/home/*/.gnupg /home/*/.local/share/Trash /home/*/.Trash /home/*/.thumbnails /home/*/.beagle /home/*/.aMule /home/*/gtk-gnutella-downloads /var/cache/backupninja/duplicity) rdiff_vsincludes= set +o noglob -- cgit v1.2.3