Permalink
Browse files

Renaming the script + update of README and CHANGELOG

  • Loading branch information...
1 parent 32a241c commit 53034bcfd86d598e7f8fa7dfdf02024f7aed41b6 @zertrin zertrin committed May 4, 2012
Showing with 81 additions and 56 deletions.
  1. +1 −0 AUTHORS
  2. +43 −28 CHANGELOG
  3. +30 −21 README
  4. +7 −7 dt-s3-backup.sh → duplicity-backup.sh
View
@@ -1,3 +1,4 @@
Damon Timm <damontimm@gmail.com> <http://blog.damontimm.com>
Mario Santagiuliana <mario@marionline.it> <http://www.marionline.it>
Razvan Marescu <rmarescu+github@gmail.com> <http://github.com/rmarescu>
+Marc Gallet <gmarc34@gmail.com> <http://github.com/zertrin>
View
@@ -1,47 +1,62 @@
+0.6 Version Six (4 May 2012)
+============================
+This is a rework of the script to include some github patches that were brought to the original script in order to make the script more generic than only Amazon S3 oriented and fix a few issues.
+
+ * Added ability not to encrypt the backup [orkaa]
+ * Added ability to use backup destination locations other than Amazon S3 [orkaa]
+ * Added support for collection-status function [orkaa]
+ * Added ability to specify variables in a config file [poppen]
+ * Fixed broken european S3 buckets [thornomad]
+ * Fixed sed issue [poppen]
+ * Fixed incorrect handling of spaces un paths and filenames [hexwizard]
+ * Renamed script to 'duplicity-backup'
+ * Modified README file to reflect the renaming of the script
+ * Cleaned up tabs in source file
+
0.5 Version Five (05/09/11)
===========================
- * added ability to email log using `mailx`
- * added `%H` (hour) to default logfile name
+ * added ability to email log using `mailx`
+ * added `%H` (hour) to default logfile name
0.4 Version Four (03/13/10)
===========================
- * Moved the source code to github
- * Add --list-files to view in the standart-output files stored in my archive [marionline]
- * Added ECHO command to troublshoot the code when needed
- * Added command line --restore to path & removed RESTORE variable [marionline]
- * Added --restore-file option [marionline]
- * Changed --backup-this-script to --backup-scrip
- * Added README to --backup-script
- * Force use of --backup option (no accidently running the script)
- * Added help text to the command line script itself [marionline]
- * Script without options shows --help and current directory settings
- * Script checks to make sure you have put some variables in before it runs [marionline]
- * A number of other minor changes
+ * Moved the source code to github
+ * Add --list-files to view in the standart-output files stored in my archive [marionline]
+ * Added ECHO command to troublshoot the code when needed
+ * Added command line --restore to path & removed RESTORE variable [marionline]
+ * Added --restore-file option [marionline]
+ * Changed --backup-this-script to --backup-script
+ * Added README to --backup-script
+ * Force use of --backup option (no accidently running the script)
+ * Added help text to the command line script itself [marionline]
+ * Script without options shows --help and current directory settings
+ * Script checks to make sure you have put some variables in before it runs [marionline]
+ * A number of other minor changes
Version Three (01/31/09)
========================
- * Added comment to explain why folks need to use 's3+' and not 's3:' for Amazon buckets
- * Used "unset" to remove the variables at end of the script
- * Fixed a problem when the backup folder on S3 was nested inside another bucket
- * Changed the PASSPHRASE field to default to the actual passphrase, so one can easily backup the entire script and not have to worry about the passphrase.
- * Added --backup-this-script option which will turn the script and the secret key into an encrypted tarball that can be kept somewhere safe for easy restores if the machine goes down.
- * Cleaned up the get_file_size function so it wouldn't run when it wasn't supposed to.
+ * Added comment to explain why folks need to use 's3+' and not 's3:' for Amazon buckets
+ * Used "unset" to remove the variables at end of the script
+ * Fixed a problem when the backup folder on S3 was nested inside another bucket
+ * Changed the PASSPHRASE field to default to the actual passphrase, so one can easily backup the entire script and not have to worry about the passphrase.
+ * Added --backup-this-script option which will turn the script and the secret key into an encrypted tarball that can be kept somewhere safe for easy restores if the machine goes down.
+ * Cleaned up the get_file_size function so it wouldn't run when it wasn't supposed to.
Version Two (12/03/08)
======================
- * added GPL license
- * changed the cleanup feature to automatically force a full backup after (n) number of days as well as automatically cleanup after (n) number of days
- * added option to force cleanup after (n) number of full backups (rather than by days)
- * option to changed log file ownership
- * runtime checks for installed required software and write permissions on log directory
- * fixed formatting of logfile to be a little more consistent
- * setup everything in clever functions
+ * added GPL license
+ * changed the cleanup feature to automatically force a full backup after (n) number of days as well as automatically cleanup after (n) number of days
+ * added option to force cleanup after (n) number of full backups (rather than by days)
+ * option to changed log file ownership
+ * runtime checks for installed required software and write permissions on log directory
+ * fixed formatting of logfile to be a little more consistent
+ * setup everything in clever functions
Version One (11/24/08)
======================
-* Initial release.
+ * Initial release.
View
51 README
@@ -2,10 +2,10 @@ ABOUT THIS SCRIPT
=================
This bash script was designed to automate and simplify the remote backup
-process of duplicity on Amazon S3. After your script is configured, you can
-easily backup, restore, verify and clean (either via cron or manually) your
-data without having to remember lots of different command options and
-passphrases.
+process of duplicity on Amazon S3 primarily. Other backup destinations are
+possible. After your script is configured, you can easily backup, restore,
+verify and clean (either via cron or manually) your data without having to
+remember lots of different command options and passphrases.
Most importantly, you can easily backup the script and your gpg key in a
convenient passphrase-encrypted file. This comes in in handy if/when your
@@ -14,11 +14,20 @@ machine ever does go belly up.
Optionally, you can set up an email address where the log file will be sent,
which is useful when the script is used via cron.
-More information about this script avaiable at:
-http://damontimm.com/code/dt-s3-backup
+This version is a rewriting of the original code by Marc Gallet, including many
+of the patches that have been brought to the original scripts by various forks
+on Github.
-Latest version of the code is available at:
-http://github.com/thornomad/dt-s3-backup
+Latest version of the code available at:
+http://github.com/zertrin/duplicity-backup
+
+Merge requests are welcome :)
+
+More information about this script available at:
+http://zertrin.org/duplicity-backup.html
+
+The original version of the code availabe at:
+http://github.com/theterran/dt-s3-backup
BEFORE YOU START
================
@@ -38,47 +47,47 @@ REQUIREMENTS
* duplicity
* gpg
-* Amazon S3
+* Amazon S3 (optional)
* s3cmd (optional)
* mailx (optional)
COMMON USAGE EXAMPLES
=====================
* View help:
- $ dt-s3-backup.sh
+ $ duplicity-backup.sh
* Run an incremental backup:
- $ dt-s3-backup.sh --backup
+ $ duplicity-backup.sh --backup
* Force a one-off full backup:
- $ dt-s3-backup.sh --full
+ $ duplicity-backup.sh --full
* Restore your entire backup:
- $ dt-s3-backup.sh --restore
+ $ duplicity-backup.sh --restore
You will be prompted for a restore directory
- $ dt-s3-backup.sh --restore /home/user/restore-folder
+ $ duplicity-backup.sh --restore /home/user/restore-folder
You can also provide a restore folder on the command line.
* Restore a specific file in the backup:
- $ dt-s3-backup.sh --restore-file
+ $ duplicity-backup.sh --restore-file
You will be prompted for a file to restore to the current directory
- $ dt-s3-backup.sh --restore-file img/mom.jpg
+ $ duplicity-backup.sh --restore-file img/mom.jpg
Restores the file img/mom.jpg to the current directory
- $ dt-s3-backup.sh --restore-file img/mom.jpg /home/user/i-love-mom.jpg
+ $ duplicity-backup.sh --restore-file img/mom.jpg /home/user/i-love-mom.jpg
Restores the file img/mom.jpg to /home/user/i-love-mom.jpg
* List files in the remote archive
- $ dt-s3-backup.sh --list-current-files
+ $ duplicity-backup.sh --list-current-files
* Verify the backup
- $ dt-s3-backup.sh --verify
+ $ duplicity-backup.sh --verify
* Backup the script and gpg key (for safekeeping)
- $ dt-s3-backup.sh --backup-script
+ $ duplicity-backup.sh --backup-script
TROUBLESHOOTING
===============
@@ -88,7 +97,7 @@ are having any problems with the script the first step is to determine if the
script is generating an incorrect command or if duplicity itself is
causing your error.
-To see exactly what is happening when you run dt-s3-backup, head to the bottom
+To see exactly what is happening when you run duplicity-backup, head to the bottom
of the user configuration portion of the script and uncomment the `ECHO=$(which
echo)` variable. This will stop the script from running and will, instead,
output the generated command into your log file. You can then check to see if
@@ -125,7 +125,7 @@ VERBOSITY="-v3"
# address is provided, no alert will be sent.
# You can set a custom from email address and a custom subject (both optionally)
# If no value is provided for the subject, the following value will be
-# used by default: "DT-S3 Alert ${LOG_FILE}"
+# used by default: "duplicity-backup Alert ${LOG_FILE}"
# MTA used: mailx
#EMAIL="admin@example.com"
EMAIL_TO=
@@ -187,7 +187,7 @@ size information unavailable."
NO_S3CMD_CFG="WARNING: s3cmd is not configured, run 's3cmd --configure' \
in order to retrieve remote file size information. Remote file \
size information unavailable."
-README_TXT="In case you've long forgotten, this is a backup script that you used to backup some files (most likely remotely at Amazon S3). In order to restore these files, you first need to import your GPG private key (if you haven't already). The key is in this directory and the following command should do the trick:\n\ngpg --allow-secret-key-import --import dt-s3-backup-secret.key.txt\n\nAfter your key as been succesfully imported, you should be able to restore your files.\n\nGood luck!"
+README_TXT="In case you've long forgotten, this is a backup script that you used to backup some files (most likely remotely at Amazon S3). In order to restore these files, you first need to import your GPG private key (if you haven't already). The key is in this directory and the following command should do the trick:\n\ngpg --allow-secret-key-import --import duplicity-backup-secret.key.txt\n\nAfter your key as been succesfully imported, you should be able to restore your files.\n\nGood luck!"
CONFIG_VAR_MSG="Oops!! ${0} was unable to run!\nWe are missing one or more important variables at the top of the script.\nCheck your configuration because it appears that something has not been set yet."
if [ ! -x "$DUPLICITY" ]; then
@@ -331,7 +331,7 @@ backup_this_script()
else
SCRIPTPATH=$(which ${0})
fi
- TMPDIR=dt-s3-backup-`date +%Y-%m-%d`
+ TMPDIR=duplicity-backup-`date +%Y-%m-%d`
TMPFILENAME=${TMPDIR}.tar.gpg
README=${TMPDIR}/README
@@ -349,7 +349,7 @@ backup_this_script()
mkdir -p ${TMPDIR}
cp $SCRIPTPATH ${TMPDIR}/
- gpg -a --export-secret-keys ${GPG_KEY} > ${TMPDIR}/dt-s3-backup-secret.key.txt
+ gpg -a --export-secret-keys ${GPG_KEY} > ${TMPDIR}/duplicity-backup-secret.key.txt
echo -e ${README_TXT} > ${README}
echo "Encrypting tarball, choose a password you'll remember..."
tar c ${TMPDIR} | gpg -aco ${TMPFILENAME}
@@ -373,7 +373,7 @@ check_variables ()
fi
}
-echo -e "-------- START dt-s3-backup SCRIPT --------\n" >> ${LOGFILE}
+echo -e "-------- START duplicity-backup SCRIPT --------\n" >> ${LOGFILE}
case "$1" in
"--backup-script")
@@ -528,14 +528,14 @@ case "$1" in
;;
esac
-echo -e "-------- END dt-s3-backup SCRIPT --------\n" >> ${LOGFILE}
+echo -e "-------- END duplicity-backup SCRIPT --------\n" >> ${LOGFILE}
if [ $EMAIL_TO ]; then
if [ ! -x "$MAIL" ]; then
echo -e "Email couldn't be sent. mailx not available." >> ${LOGFILE}
else
EMAIL_FROM=${EMAIL_FROM:+"-r ${EMAIL_FROM}"}
- EMAIL_SUBJECT=${EMAIL_SUBJECT:="DT-S3 Alert ${LOG_FILE}"}
+ EMAIL_SUBJECT=${EMAIL_SUBJECT:="duplicity-backup Alert ${LOG_FILE}"}
cat ${LOGFILE} | ${MAIL} -s """${EMAIL_SUBJECT}""" $EMAIL_FROM ${EMAIL_TO}
echo -e "Email alert sent to ${EMAIL_TO} using ${MAIL}" >> ${LOGFILE}
fi

0 comments on commit 53034bc

Please sign in to comment.