Compare commits

...

235 commits
0.8.3 ... dev

Author SHA1 Message Date
zertrin
c78676ab9d Try to fix travis CI 2018-05-22 11:59:24 +08:00
zertrin
2dec3ed145 Update README.md 2018-05-22 11:35:35 +08:00
zertrin
c56e78a463 Update changelog with release date for v1.6.0 2018-05-22 11:23:51 +08:00
zertrin
27785d0ad0 Update changelog and bump version to v1.6.0 2018-05-22 11:20:53 +08:00
zertrin
4dd6ed1ee2 Fix issue #177: bug in cleanup action 2018-05-22 11:10:06 +08:00
zertrin
5cad03cb3e
Merge pull request #175 from elisman/patch-1
Removed SSH backend scheme example
2018-02-27 10:10:22 +08:00
Elisei Rotaru
f71dd556dc
Removed SSH backend scheme example
Removed SSH backend scheme example as it is not supported anymore by duplicity. As of version v0.7.01 (2015/01/11) ssh is an unsupported backend scheme. Using it with a newer release throws an error (UnsupportedBackendScheme: scheme not supported in url).
2018-02-21 11:28:03 +01:00
zertrin
77ecc4318f
Update Changelog 2018-02-03 11:40:29 +01:00
zertrin
99b2512789
Merge pull request #174 from xmatthias/fix_swift
unset swift variables
2018-02-03 11:37:45 +01:00
zertrin
4779ee4d1b
Merge branch 'dev' into fix_swift 2018-02-03 11:37:07 +01:00
zertrin
96a64148fd
Merge pull request #173 from xmatthias/dropbox
introduce dropbox functionality
2018-02-03 11:36:20 +01:00
Matthias Voppichler
6140c226db unset swift variables 2018-01-31 22:52:28 +01:00
Matthias Voppichler
18ef8983aa introduce dropbox functionality 2018-01-31 22:34:06 +01:00
zertrin
734be37b6d Bump version to v1.5.0 2018-01-15 16:00:47 +08:00
zertrin
9fea5075ab
Merge pull request #170 from harrim4n/dev
Add support for B2 backend
2018-01-15 15:51:10 +08:00
harrim4n
ae37de0e65 fixed shellcheck errors 2017-12-23 20:01:22 +01:00
harrim4n
2a77dde6ee added support for B2 backend 2017-12-23 19:04:00 +01:00
zertrin
e070ca7887
Merge pull request #168 from arichiardi/fix-file-dest
Use regex for trimming file:// destinations
2017-11-14 22:34:33 +08:00
zertrin
5a023c3609
Merge pull request #167 from arichiardi/notification-separator
Add notification separator
2017-11-14 22:27:23 +08:00
Andrea Richiardi
6377ad5281 Use regex for trimming file:// destinations
A problem with cut was causing:

  $ DEST="file:///media/user/data"
  $ TMPDEST=$(echo "${DEST}" | cut -c 6-)
  $ echo $TMPDEST
  ///media/user/data

The fix uses a regex instead so that we trim away things correctly. It also seems somewhat more
readable.
2017-11-13 21:14:07 -08:00
Andrea Richiardi
649c7830b0 Add notification separator
The notification request is now isolated visually for better debugging.
2017-11-12 17:28:32 -08:00
zertrin
dba25a57de change example conf to use single quotes for passphrases and paths 2017-11-05 11:08:24 +08:00
zertrin
13af8206e3 Bump version to v1.4.3 2017-10-30 23:44:52 +08:00
zertrin
9a36453bb1 Merge branch 'GerardRibas-telegram-notifications' into dev 2017-10-30 23:35:47 +08:00
zertrin
a7752c4c78 Minor changes before merging PR adding Telegram notifications support 2017-10-30 23:34:45 +08:00
zertrin
06291f0a6e Merge branch 'telegram-notifications' of git://github.com/GerardRibas/duplicity-backup.sh into GerardRibas-telegram-notifications 2017-10-30 23:14:17 +08:00
zertrin
cd82c07579 Remove VERSION file and hardcode it directly in the script 2017-10-30 22:33:30 +08:00
Gerard Ribas Canals
de7a6be9fe Telegram Notifications 2017-10-13 10:17:01 +02:00
zertrin
98bcf9f673 Bump version to 1.4.1 2017-10-04 09:59:55 +08:00
zertrin
0c4f2b7c45 Improved version parsing. Fix bug on MacOS (thanks @ErebusBat) 2017-09-30 22:50:03 +08:00
zertrin
2389ee61db Fix program version output when cwd is not the same as scriptdir 2017-09-29 12:16:20 +08:00
zertrin
def00abe60 Show program versions in output 2017-09-28 09:59:37 +08:00
zertrin
e4df413036 add link to issue #143 in Known issues section in the README 2017-09-24 14:35:38 +08:00
zertrin
dd2189ec4d Bump version to 1.4.0 2017-09-24 14:26:22 +08:00
zertrin
f8c4d0cc16 Add duplicity version check to handle deprecation of --include-globbing-filelist (fixes #136) 2017-09-24 14:23:36 +08:00
zertrin
723945af44 Merge pull request #157 from gunnarx/readme_spell
README.md: Fix some spelling errors
2017-06-06 15:15:28 +08:00
Gunnar Andersson
b7c292b5ff README.md: Fix some spelling errors 2017-06-05 08:31:32 +02:00
zertrin
cc2ae25355 Merge pull request #154 from dgibbs64/dev
[hostname] contains invalid character '[' in CentOS 7
2017-04-19 12:53:52 +08:00
zertrin
d1311a185a Merge pull request #156 from wtsi-hgi/fix/155-s3SchemeIdentification
Corrects cut of s3 protocol.
2017-04-19 12:53:25 +08:00
Colin Nolan
25d63bb99f Corrects cut of s3 protocol. 2017-04-18 09:36:32 +01:00
Daniel Gibbs
2ad58dc07e [hostname] contains invalid character '[' in CentOS 7
[hostname] contains invalid character '[' in CentOS 7 changed [ to (

See https://www.jethrocarr.com/2012/06/10/mailx-contains-invalid-character-2/

There may be a better way to resolve this however this quick fix works
2017-03-27 18:56:06 +01:00
zertrin
418ab79b11 Bump version to v1.3.0 2016-10-23 20:05:08 +02:00
zertrin
6ba17fa268 Rename repository from 'duplicity-backup' to 'duplicity-backup.sh' 2016-10-23 20:04:23 +02:00
zertrin
b207b90cba Add -h / --help option to print usage and don't send email or notification when printing usage only 2016-10-23 20:00:23 +02:00
zertrin
fb54103607 Attempt to fix issue #145 by adding a parameter 2016-10-23 19:39:32 +02:00
zertrin
d2ae7c58c1 Fix GPG error when backing up the script if no specific keyring is set up 2016-09-11 23:04:46 +02:00
zertrin
a827d886f4 Version v1.2 2016-09-10 14:56:35 +02:00
zertrin
5a5244e164 Fix "line 89: 4: Bad file descriptor" when printing usage without config set up 2016-09-10 14:56:05 +02:00
zertrin
26dc5cab55 Merge pull request #141 from arichiardi/fix-gpg-photo
Add --no-show-photos to --gpg-options
2016-09-09 16:55:02 +02:00
zertrin
cddd3f3c74 Merge pull request #137 from zertrin/rework-logging
Big rework of logging handling. Add a --quiet option to suppress most output
2016-09-09 16:54:47 +02:00
Andrea Richiardi
277677350c Add --no-show-photos to --gpg-options, fixes #140 2016-09-08 19:13:26 -07:00
zertrin
fb54765c53 Merge remote-tracking branch 'origin/dev' into rework-logging 2016-09-08 20:57:11 +02:00
zertrin
4bdde466e2 Merge pull request #138 from zertrin/fix-issue-135-s-nail
Add case for s-nail when using mailx
2016-09-06 11:40:09 +02:00
zertrin
0f901f4f78 Always exclude /proc from Source Disk Use Information 2016-09-05 01:40:52 +02:00
zertrin
4d5ab6247d Add case for s-nail when using mailx 2016-09-05 01:15:47 +02:00
zertrin
5d20128634 Improve some of the new comments about the new logging 2016-09-03 23:43:19 +02:00
zertrin
6c7eea2401 Big rework of logging handling. Add a --quiet option to suppress most output
To achieve the goals, I needed to dive into the arcane art of I/O
redirection in Bash. By playing correctly with the file descriptors and
tee, we can implement a sort of logging level system.
2016-09-03 23:26:54 +02:00
zertrin
b39300c514 Add --version option to README.md 2016-09-03 17:45:16 +02:00
zertrin
6421242e02 Wrap long lines in the CHANGELOG 2016-09-03 17:41:57 +02:00
zertrin
e92a4c49b3 v1.1 restart versionning and keeping a CHANGELOG
This time for real.
2016-09-03 17:30:17 +02:00
zertrin
4fbb5ed190 Merge remote-tracking branch 'origin/fix-issue-128-incexc' into dev
Fix and improve handling of INCLIST and EXCLIST
2016-09-03 15:41:56 +02:00
zertrin
17e40b3c67 Fix shellcheck error SC2166 2016-09-03 15:16:17 +02:00
zertrin
6b7c1c66b2 Fix shellcheck error SC2128 2016-09-03 15:14:19 +02:00
zertrin
f9c07e28fa Fix shellcheck SC2153 and SC1090 2016-09-03 15:10:18 +02:00
zertrin
73adf5dc99 Fixes related to new warnings coming from the new version of shellcheck 2016-08-31 23:03:09 +02:00
zertrin
f4c999b2c5 Merge pull request #133 from jrbenito/ifttt
Add IFTTT notification service
2016-08-31 22:11:07 +02:00
Josenivaldo Benito Jr
6ce9a646cd Wrong identation
Signed-off-by: Josenivaldo Benito Jr <jrbenito@benito.qsl.br>
2016-08-31 17:09:28 -03:00
Josenivaldo Benito Jr
562d6d05f2 Merge branch 'dev' into ifttt 2016-08-31 17:05:31 -03:00
zertrin
1238c14af6 Merge pull request #134 from jrbenito/issue_sendnotification_and_email
Send notification if stale lock is detected
2016-08-31 22:00:19 +02:00
Josenivaldo Benito Jr
4f96d724b3 Send notification if stale lock is detected
add send notification along with e-mail notification on stale lock
check.

Signed-off-by: Josenivaldo Benito Jr <jrbenito@benito.qsl.br>
2016-08-31 16:36:29 -03:00
Josenivaldo Benito Jr
465ae13b78 Add IFTTT notification service
Add the ability to trigger a custom event on the Maker channel provided
by IFTTT service. With this trigger one can program actions on another
channels. Examples:

-Log backup notification to a google spreadsheet;
-Receive notification on devices with IFTTT application installed;
-Send e-mails
-Log to evernote
-Turn a Philips Hue light green for good backup or red on errors

IFTTT Maker channel accepts three values (named value1, value2, value3)
as part of the trigger. This implementation sends the content of
NOTIFICATION_CONTENT as "value1" parameter and let "value2" be defined
at
configuration file. At this time "value3" is not used.

Signed-off-by: Josenivaldo Benito Jr <jrbenito@benito.qsl.br>
2016-08-31 15:26:12 -03:00
Josenivaldo Benito Jr
c9bd2a49f2 Add IFTTT notification service
Add the ability to trigger a custom event on the Maker channel provided
by IFTTT service. With this trigger one can program actions on another
channels. Examples:

-Log backup notification to a google spreadsheet;
-Receive notification on devices with IFTTT application installed;
-Send e-mails
-Log to evernote
-Turn a Philips Hue light green for good backup or red on errors

IFTTT Maker channel accepts three values (named value1, value2, value3)
as part of the trigger. This implementation sends the content of
NOTIFICATION_CONTENT as "value1" parameter and let "value2" be defined at
configuration file. At this time "value3" is not used.

Signed-off-by: Josenivaldo Benito Jr <jrbenito@benito.qsl.br>
2016-08-31 15:13:34 -03:00
zertrin
637336a45d Merge pull request #131 from lechup/cleanup
Adding -e, --cleanup flag
2016-07-13 19:10:58 +02:00
Leszek Piątek
4c99612258 Added info in readme about --cleanup flag. 2016-07-13 18:24:04 +02:00
Leszek Piątek
2f07d0e216 Adding -e, --cleanup flag... 2016-07-13 18:23:27 +02:00
zertrin
9e02ee3296 Merge pull request #130 from ArthurGarnier/dev
Support mailx from mailutils
2016-07-13 17:55:55 +02:00
Arthur Garnier
1604d024d7 Support mailx from mailutils 2016-07-03 01:07:08 +02:00
Marc Gallet
7a84fbdfa8 Fix for issue #128 2016-06-15 13:38:18 +02:00
zertrin
dcdc081f30 changed my mind about where to place NOTIFICATION_SERVICE 2016-04-29 15:31:56 +02:00
zertrin
b90289d33b minor comment changes to notifications 2016-04-29 15:27:40 +02:00
zertrin
b92d60f028 Merge commit '0501d233' into dev 2016-04-29 14:34:39 +02:00
sean
0501d23303 fixed error 2016-04-28 15:58:49 -04:00
zertrin
6dc6d198bb Restore the functionality to specify a custom mail script 2016-04-28 21:28:54 +02:00
thel0be
3ffde7807f Adding Pushover notifications 2016-04-23 14:15:09 -04:00
zertrin
d7737e3045 Merge pull request #120 from zertrin/fix-email-handling
Full rework of email handling
2016-04-10 16:37:48 +02:00
zertrin
09550fdd28 Merge pull request #121 from dismantl/gpg_backslashes
added -r flag to bash read to allow backslashes in GPG passphrases
2016-04-10 16:36:20 +02:00
Dan Staples
a719668f15 added -r flag to bash read to allow backslashes in GPG passphrases 2016-04-06 11:05:19 -04:00
zertrin
fad4bd2425 Full rework of email handling 2016-04-01 23:21:19 +02:00
zertrin
a1c16990d1 Merge pull request #119 from colinfrei/patch-1
Typo
2016-03-28 23:49:29 +02:00
zertrin
f3f4ddcd89 rework code for email and notifications (more DRY) 2016-03-28 23:47:39 +02:00
Colin Frei
74f637d4f9 Typo 2016-03-28 23:21:02 +02:00
zertrin
279a5580fe Update README.md - add missing git fetch step 2016-03-26 12:51:19 +01:00
zertrin
8c5de6162e Update README.md - add travis badge and rework of the Contributing section 2016-03-25 21:14:39 +01:00
zertrin
4513feaf26 Merge pull request #118 from zertrin/shellcheck_cleaning
- massive cleaning with shellcheck: from 5 errors and 200 warnings to zero
- adding Travis-CI
2016-03-25 20:49:31 +01:00
zertrin
bcd64c10d2 first iteration after activation of Travis-CI 2016-03-25 20:40:46 +01:00
zertrin
93e9854b98 let's try to do some Travis-CI with shellcheck 2016-03-25 20:29:06 +01:00
zertrin
6c63877052 one last cleaning in the conf file with shellcheck 2016-03-25 20:00:39 +01:00
zertrin
3797960809 massive cleaning with shellcheck: from 5 errors and 200 warnings to zero 2016-03-25 19:47:29 +01:00
zertrin
8c0f58d8f0 Merge branch 'sparanoid-patch-1' into dev 2016-03-25 17:40:32 +01:00
zertrin
5cf7abbdba Merge branch 'chrissam-dev' into dev 2016-03-24 21:12:34 +01:00
zertrin
454d2781e8 minor changes to the pull request before merging 2016-03-24 21:12:17 +01:00
zertrin
60d5e058df Merge branch 'patch-2' of https://github.com/sparanoid/duplicity-backup into sparanoid-patch-2
Conflicts:
	duplicity-backup.conf.example
2016-03-24 21:03:20 +01:00
zertrin
471cc9f88b minor changes to the pull request before merging 2016-03-24 20:59:42 +01:00
Christopher Sam
491b045599 Add storage class option for AWS S3 to specify storage class to be used 2016-03-16 18:01:49 +05:30
Tunghsiao Liu
3eabe0dce5 Add config sample for Slack notifications 2016-02-26 14:56:31 +08:00
Tunghsiao Liu
fcfa9ac064 Add Slack incoming webhook notifications support 2016-02-26 14:54:34 +08:00
Tunghsiao Liu
4fca4440d1 Better comment 2016-02-26 14:44:46 +08:00
David Kolb
ff1e8270c0 Adding support for custom mail scripts. 2016-01-27 10:50:15 -05:00
zertrin
17b3f70063 Merge pull request #111 from vx28643/dev
added ftps and ftpes to list of possible destinations
2016-01-23 12:19:19 +01:00
vx28643
931fe9e995 added ftps and ftpes to list of possible destinations 2016-01-23 15:12:03 +11:00
zertrin
3b06a9bf02 Merge pull request #107 from sparanoid/patch-1
Fix typo
2015-10-19 10:49:03 +02:00
Tunghsiao Liu
423a1d37f8 Fix typo 2015-10-19 13:59:34 +08:00
zertrin
36a1a7f2da Update README.md - detailed contribution howto 2015-10-12 13:27:20 +02:00
zertrin
3a48d5a719 Fix bug #106 (unary operator expected) 2015-10-10 13:31:12 +02:00
zertrin
b105051554 Rework README.md 2015-10-08 11:39:23 +02:00
zertrin
bbfafcab0c Merge branch 'paszczus-master' into dev 2015-10-08 10:16:57 +02:00
zertrin
e5d57852ce also send email on cleanup failure + replace introduced tabs with spaces 2015-10-08 10:15:56 +02:00
Sławomir Paszkiewicz
8985d9c432 - added EMAIL_FAILURE_ONLY option to send e-mails only if there was an error while doing backup
- added HOSTNAME option to inform in e-mail report for which server is this report for
- e-mail subject is rewrited now to know if backup was OK or not
2015-09-02 10:17:14 +02:00
zertrin
142f4c6b89 Merge branch 'awk_backslash' of https://github.com/mddirba/duplicity-backup into mddirba-awk_backslash 2015-08-20 23:06:01 +02:00
Matthew Dirba
689eb23161 add more backslashes to unweildy awk script 2015-08-17 14:58:00 -05:00
zertrin
6c3564da1e Slight rework of README.md 2015-07-29 22:23:03 +02:00
zertrin
498ac973e7 Rework of duplicity-backup.conf.example, no functionality changes 2015-07-29 21:56:53 +02:00
Jean-Baptiste Alleaume
5bdb816b63 Add OpenStack Swift support 2015-07-29 15:38:48 +02:00
zertrin
0dfa26af59 change mode of script to 755 2015-07-05 20:08:51 +02:00
bayareamarketing
0644d7679c Make tar stdin/stdout explicit in backup function
Fixes (show stopper) error on FreeBSD, potentially other platforms: 
$ gpg -d duplicity-backup-2015-xx-xx.tar.gpg | tar x
tar: Error opening archive: Failed to open '/dev/sa0'
(tar does not r/w to stdin/out by default, you have to specify)
2015-06-24 13:33:06 +02:00
Marc Gallet
19951b7180 Fix issue #94 2015-05-21 09:09:10 +02:00
zertrin
a69eeaad85 Delete trailing spaces 2015-05-18 18:40:23 +02:00
zertrin
4be3671511 Fix bug #93 : make message about unsupported destination disk usage more explicit 2015-05-18 18:17:34 +02:00
zertrin
6fb8b4e46b Improve requirements section in the README 2015-05-15 10:18:34 +02:00
zertrin
1aca860e06 Fix README.md 2015-05-15 10:13:45 +02:00
zertrin
771c2715be Merge branch 'bova82-google-cloud-storage' into dev
Conflicts:
	duplicity-backup.sh
2015-05-15 10:05:41 +02:00
Giovanni Pini
2be958e0ec Human readable size for Google Cloud 2015-05-14 16:17:20 +02:00
Giovanni Pini
01143b6834 Size GCS with gsutil 2015-05-14 16:16:56 +02:00
Giovanni Pini
8abfd40c30 Google Cloud Storage support 2015-05-14 14:16:59 +02:00
Giovanni Pini
6256f0a701 Update README.md 2015-05-14 14:16:43 +02:00
zertrin
e976b5def9 Merge branch 'move-exclude-device-files' into dev 2015-04-21 00:10:46 +02:00
zertrin
749834d34d Merge remote-tracking branch 'mddirba/master' into dev 2015-04-21 00:03:55 +02:00
Rob Miceli
528cc41a7a Move --exclude-device-files to beginning of EXCLUDE variable
duplicity gives a warning when --exclude-device-files is not the first
selector in the exclude arguments. This commit moves the selector and
fixes the warning.

Minor spelling and space corrections
2015-04-20 13:33:44 -04:00
Matt Dirba
c8d249da18 removed perl dependancy 2015-04-17 08:54:36 -05:00
zertrin
624e32be4b Merge pull request #84 from phillxnet/unset-ftp-password
unset ftp_password variable
2015-04-16 20:51:48 +02:00
zertrin
8c1af2145d Merge pull request #85 from phillxnet/s3cmd-config-report
Improve reporting on s3cmd state and make disk use log report formats consistent, and add type to destination report
2015-04-16 20:49:34 +02:00
Matt Dirba
20ded180e8 Appending usage information to EMAIL_SUBJECT
modified:   duplicity-backup.sh
2015-04-13 17:13:08 -05:00
Matt Dirba
a749d24901 Add support for getting size of remote disk connected via ssh 2015-04-10 15:26:28 -05:00
Philip
e94732a473 Add destination type to disk use report and make format consistent with source du report 2015-01-27 15:23:11 +00:00
Philip
08cb675755 improve s3cmd not installed message, ie mention PATH 2015-01-27 13:13:18 +00:00
Philip
3fcfb220c2 add s3cmd config not found to dest disk use report 2015-01-26 19:20:44 +00:00
Philip
92a39325cf unset ftp_password variable 2015-01-23 19:12:57 +00:00
zertrin
9e55b84837 Merge branch 'dev' 2015-01-23 20:00:47 +01:00
Philip
258e68c95a copy whole array rather than one element 2015-01-23 17:02:25 +00:00
Philip
ea14212806 remove not on -z INCLIST check 2015-01-23 16:25:51 +00:00
zertrin
2e6e383538 Rework on the pull request to refactor the new code 2015-01-21 16:29:42 +01:00
zertrin
b34c7a5986 Include the include/exclude globbing file in the backup tarball if present 2015-01-21 15:59:42 +01:00
Philip
6f5b0dccc8 My typo in code comment - du not df 2015-01-19 20:13:52 +00:00
Philip
01ec946eef Correct log reports of file size to disk use, plus some log file formatting cleanups 2015-01-19 19:08:23 +00:00
Philip
646f8c4036 Excluded directories were no excluded from source disk usage report - quotes issue 2015-01-19 18:36:11 +00:00
Philip
6ccf6917e4 Don't skip source disk use report when INCLIST unconfigured 2015-01-19 17:17:56 +00:00
zertrin
c12bca41e0 Merge pull request #78 from phillxnet/logdir_owner
When creating our log directory we should set its owner:group to that of the log file owner
2015-01-18 23:39:02 +01:00
Philip
bdcb1bffd7 Update example config with log dir creation info 2015-01-18 18:01:32 +00:00
Philip
d3c21028b0 If we create the log dir chown it to log file owner 2015-01-18 14:50:35 +00:00
zertrin
f4000f9c36 Update README.md - HTTPS links when available 2014-12-06 12:03:32 +01:00
zertrin
edca6379ec Merge pull request #75 from csmithATsquiz/tmpdir
add an option to set the tmpdir for duplicity to use.
2014-12-05 10:56:51 +01:00
zertrin
f45829e583 Merge pull request #74 from csmithATsquiz/ssh_issue
Collection status over ssh
2014-12-05 10:43:21 +01:00
Christopher Smith
59f2339c2c add an option to set the tmpdir for duplicity to use. 2014-12-05 09:39:05 +11:00
Christopher Smith
83b7ecdbe0 doing a collection status and file list need to eval the command (like all the other commands already do) because if you have ssh options set in your config, it causes an error ("duplicity: error: no such option: -o") 2014-12-05 09:30:05 +11:00
zertrin
18c7f40a7f Merge pull request #71 from martinec/master
fix: ensure a trailing slash in log dir name
2014-08-16 17:42:41 +02:00
martinec
7b20db3953 fix: ensure a trailing slash in log dir name
LOGDIR="/foo/bar" (without  a trailing slash) produces /foo/barbackup.lock and/foo/barduplicity-* files, not /foo/bar/backup.lock and /foo/bar/duplicity-* files as expected. This fix ensures a trailing slash in the log dir name.
2014-08-10 03:08:38 +02:00
zertrin
4b640db241 Merge pull request #68 from ifdattic/add-note-about-escaping-passphrase
Add a note in configuration about escaping "$" in passphrase
2014-06-06 16:01:53 +02:00
zertrin
e84daf47e4 Merge pull request #67 from ifdattic/add-google-docs-destination
Add Google Docs destination to configuration
2014-06-06 16:01:26 +02:00
zertrin
33a0bd6b3b Merge pull request #66 from ifdattic/fix-typos
Fix typos, remove trailing whitespace
2014-06-06 16:00:58 +02:00
Andrew M
456f5cd835 Add a note in configuration about escaping "$" in passphrase 2014-06-06 12:11:58 +03:00
Andrew M
615a988779 Add Google Docs destination to configuration 2014-06-06 12:09:04 +03:00
Andrew M
a148ac8a5c Fix typos, remove trailing whitespace 2014-06-06 12:03:18 +03:00
zertrin
e0a38f8453 Update README.md, format, precision about backends 2014-04-26 09:21:30 +02:00
zertrin
1bde60d7b7 Add REMOVE_LOGS_OLDER_THAN parameter to the config file 2014-04-16 15:05:23 +02:00
zertrin
54f1389a05 Merge commit '9f5626bd19' from jbernhard/duplicity-backup into dev 2014-04-16 14:56:14 +02:00
zertrin
a197a5cd07 Update README.md - add link to duplicity at the beginning 2014-04-16 14:44:52 +02:00
zertrin
427c8ed083 Update README.md
by making the distinction between duplicity-backup.sh and duplicity
2014-04-16 14:40:24 +02:00
Jonah Bernhard
9f5626bd19 Add option to remove old log files. 2014-03-30 14:44:31 -04:00
Jonah Bernhard
36f87c73f1 Only change log file ownership if necessary. 2014-03-30 14:44:17 -04:00
Jonah Bernhard
b20f7ab687 Clarification when remote size unavailable. 2014-03-30 14:43:53 -04:00
Matthias Rampke
4f90cc7440 add support for DragonFly and OpenBSD
DragonFly is a FreeBSD derivative, so the same `du` flags as for FreeBSD
and Darwin apply. OpenBSD does not support exclusion.

The correct invocation for in-place `sed` without backup varies. GNU Sed
allows just leaving out the suffix, but BSD Sed requires an empty suffix
(which in turn GNU Sed doesn't accept). OpenBSD Sed has no in-place
option, use `ed` instead.

`mail` works the same on all BSD.

explicitly list `bash` dependency, it's not installed on most BSD by default.
2014-03-04 12:22:14 +01:00
zertrin
0f11e6f163 Merge pull request #61 from jaltek/patch-1
Update README.md - Reduced the wishlist
2014-03-03 00:31:24 +01:00
Jan
7d5db1119f Update README.md - Reduced the wishlist
I think the last point was implemented with #41 ;)
2014-02-11 18:08:57 +01:00
zertrin
60234a22c3 Merge pull request #60 from johnpatcher/fix/if-condition-quotation
duplicity-backup.sh: Fix quotation issue
2014-02-05 17:50:19 +01:00
Karol Babioch
3bfd78c19c duplicity-backup.sh: Fix quotation issue
The if condition was not quoted correctly, leading to an error that a unary
operator is expected. This fixes it by quoting the condition correctly, which
is already done in the same way for most of the following if conditions.
2014-02-05 16:59:34 +01:00
zertrin
5e939fd632 Merge remote-tracking branch 'dismantl/option-updates' into dev
Conflicts:
	duplicity-backup.sh
2014-02-04 23:44:23 +01:00
Dan Staples
22099553ab dont include --sign-key when restoring w/ hidden-enc key 2014-01-06 17:24:51 -05:00
Dan Staples
417d5262c7 only cleanup if CLEAN_UP_TYPE and CLEAN_UP_VARIABLE are defined 2014-01-03 16:25:26 -05:00
Dan Staples
1864e3ae98 added HIDE_KEY_ID and SECRET_KEYRING options 2014-01-03 15:26:26 -05:00
Yaron de Leeuw
07c1fd2867 Added the option to skip cleanup
I've added the option to skip cleanup by setting CLEANUP_TYPE to  'none'.
This is relevant to me because my s3 api key is not allowed to delete files,
making my backup more resistable to human error / someone getting hold of this
plaintext accessible key.
2014-01-02 16:16:23 +02:00
jaltek
1bd7c260ad Fixes issue zertrin/duplicity-backup/issues/41 - conf revert 2013-11-22 10:32:19 +01:00
jaltek
7d836294ce Fixes issue zertrin/duplicity-backup/issues/41 2013-11-22 10:29:07 +01:00
zertrin
afd29ba2d4 Merge pull request #57 from piperj/pull
Minor typo correction to the README file
2013-11-14 00:57:56 -08:00
Johan Piper
a2204bf1dc Merged https://github.com/zertrin/duplicity-backup.git
Conflicts (straight-forward resolution):
	README.md
2013-11-13 23:22:49 +00:00
Johan Piper
9f8c0c4025 Minor typo correction to the README file 2013-11-13 23:17:44 +00:00
Zertrin
54f9aaf27a Complete the half-done work of previous commit 2013-11-13 21:56:12 +01:00
zertrin
03ef054cf3 Add the --restore-dir synonym and update the documentation accordingly 2013-11-13 21:36:34 +01:00
zertrin
e9af0ab3c1 Some little modifications and additions in the doc of the config file 2013-11-13 20:08:34 +01:00
zertrin
dd05ff68b6 Add support for mail sending via msmtp
(adapted cherry-pick from commit 7f8b9b6e2fb49ce3bae166674a06754e5940ea04 of Dosenpfand)
2013-11-13 19:55:47 +01:00
Federico C. Guizzardi
5c99b4c3ca fixed variable name
(cherry picked from commit 19c80a83a2819bdac73dfe4bc08e270205a9a666)
2013-11-13 19:36:15 +01:00
Johan Piper
bac95a2294 Updated README file to explain --dry-run and --debug 2013-11-12 23:14:28 +00:00
Johan Piper
22e390494c Renamed the --dry-run option to --debug.Created proper duplicity --dry-run command (recommended -v8, info verbosity level) 2013-11-11 00:06:31 +00:00
zertrin
9905761b26 Update README.md to reflect policy change about pull requests 2013-08-12 11:43:45 +02:00
zertrin
c3aa58bf59 Small improvements to the fix of cippino before merge 2013-08-12 11:06:09 +02:00
Federico C. Guizzardi
0275cb5668 Fixed INCLIST 2013-08-02 10:52:08 +02:00
zertrin
02015c89d5 Merge branch 'joubertredrat-ftp-password' 2013-07-22 12:01:48 +02:00
zertrin
dbf78cfcd6 Better explanation of the FTP_PASSWORD variable based on official documentation 2013-07-22 11:59:41 +02:00
zertrin
63d38be243 Add notes about the difference between "mailx" and "mail" commands 2013-07-22 10:20:29 +02:00
zertrin
68931e4f5a Move the new section about remove-all-inc-of-but-n-full a bit lower in the config file. 2013-07-22 10:11:31 +02:00
Ville Walveranta
9b34c04802 Adds the option to use remove-all-inc-of-but-n-full to prune incrementals of backups with long history. 2013-07-21 19:58:46 -05:00
zertrin
3faf4e5ce3 Merge pull request #51 from linsomniac/master
Fixing a typo.
2013-07-19 17:05:31 -07:00
Sean Reifschneider
3ce941c9b4 Typo. 2013-07-19 13:14:11 -06:00
Joubert
582416f2e6 A small contribution with a set a ftp variable to run on a script 2013-07-09 11:52:03 -03:00
zertrin
7bab9666f8 Merge pull request #49 from pew/master
sendmail elif typo
2013-07-07 14:49:32 -07:00
Jonas
7275aaff4c sendmail error 2013-07-07 19:03:42 +02:00
zertrin
82ff39370c Merge pull request #47 from jverdeyen/feature/sendmail
added sendmail as mail command
2013-07-03 01:18:22 -07:00
Joeri Verdeyen
31da9c897c Sendmail as mail command 2013-07-03 09:21:20 +02:00
zertrin
3ad3acad46 Update README.md: gpg is actually optionnal 2013-05-29 00:48:23 +02:00
zertrin
b4f069c87c Update README.md
Minor modifications
2013-05-15 17:59:56 +02:00
zertrin
67b62a8457 Merge pull request #43 from Neal/master
Make readme pretty!
2013-05-15 08:33:18 -07:00
zertrin
1f8fa592b4 Merge pull request #42 from Neal/patch-1
Fix typos.
2013-05-15 07:47:58 -07:00
Neal
c8bf552670 Make readme pretty! (using markdown) 2013-05-14 22:57:45 -05:00
Neal
e636dd40d4 Fix typos. 2013-05-14 22:12:27 -05:00
zertrin
2cd21d6e0b Add cron usage example in README
Following suggestion of benArrayx in issue #35
2013-05-03 15:04:02 +03:00
zertrin
2f3af1ab4d Merge pull request #40 from brki/allow-s3-scheme-when-getting-remote-size
Let s3cmd have the correct bucket name when using s3 scheme
2013-03-31 13:09:01 -07:00
zertrin
6fc32c235c Merge pull request #39 from brki/helpful-config-error-messages
Be a bit more specific about configuration problems
2013-03-31 13:06:37 -07:00
Brian King
89a78edb9f Be a bit more specific about configuration problems 2013-03-31 01:24:26 +01:00
Brian King
7bb45ff939 Let s3cmd have the correct bucket name when using s3 scheme 2013-03-31 01:21:43 +01:00
zertrin
ee1b759656 Fix issue #38 : Multiple recipients
Quick fix for the case of multiple email recipients.
Thanks to raydoll for the bug report.
2013-03-23 00:14:23 +01:00
zertrin
b1554306fb Merge pull request #36 from stijnopheide/osx
Fix for du --exclude-from and mail on OS X
2013-01-29 07:34:22 -08:00
Stijn Opheide
bc0fa15415 Fix for du --exclude-from and mail on OS X 2013-01-29 14:32:05 +01:00
zertrin
feb34dd46a Merge pull request #34 from franek/master
Add nail support
2013-01-14 12:31:33 -08:00
François D.
02fae5cba2 Update duplicity-backup.sh
Add nail support (for busybox / Synology)
2013-01-14 21:25:36 +01:00
Zertrin
6df09021a6 Fix issue #33 : Allow to specify the s3cmd configuration file 2013-01-14 01:04:56 +01:00
Zertrin
1a77ee0d58 v0.8.3 2013-01-02 12:07:59 +01:00
8 changed files with 1654 additions and 504 deletions

13
.travis.yml Normal file
View file

@ -0,0 +1,13 @@
language: bash
# Use container-based infrastructure for quicker build start-up
sudo: false
before_script:
- shellcheck --version
script:
- shellcheck -e SC2034 duplicity-backup.sh duplicity-backup.conf.example
matrix:
fast_finish: true

View file

@ -1,4 +1,5 @@
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>
Razvan Marescu <rmarescu+github@gmail.com> <https://github.com/rmarescu>
Marc Gallet <zertrin@gmail.com> <https://github.com/zertrin>
All commit contributors https://github.com/zertrin/duplicity-backup/graphs/contributors

View file

@ -1,3 +1,68 @@
vX.X.X (unreleased)
===================
v1.6.0 (2018-05-22)
===================
* Add support for Dropbox backend (by xmatthias)
* Fix issue #177: bug in `--cleanup` action (thanks smcgrat)
v1.5.0 (2018-01-15)
===================
* Add support for B2 backend (by harrim4n)
v1.4.3 (2017-10-30)
===================
* Add support for Telegram notifications (by GerardRibas)
v1.4.2 (2017-10-30)
===================
* Remove VERSION file and hardcode it directly in the script. Fix issue #164 (thanks regelga)
v1.4.1 (2017-10-04)
===================
* Show program versions in output.
v1.4.0 (2017-09-24)
===================
* Add version check of duplicity to handle deprecation of --include-globbing-filelist
* Bugfixes
v1.3.0 (2016-10-23)
===================
* Fix GPG error when backing up the script if no specific keyring is set up.
* Attempt to fix issue #145 by adding a `GPG_OPTIONS` parameter.
* Add `-h` / `--help` option to print usage and don't send email or notification when printing usage only
* Rename repository from 'duplicity-backup' to 'duplicity-backup.sh'.
v1.2 (2016-09-10)
=================
* Changed: big rework of logging handling. Now done through I/O-redirection of file descriptors 1 to 5.
* Fix: Add case for s-nail when using mailx.
* Fix: Always exclude /proc from Source Disk Use Information.
* Fix issue #140: Add --no-show-photos to --gpg-options.
* Fix "line 89: 4: Bad file descriptor" when printing usage without config set up.
v1.1 (2016-09-03)
===================
* Fix and improve handling of INCLIST and EXCLIST (issue #128)
* Fix shellcheck error SC2166
* Fix shellcheck error SC2128
* Fix shellcheck SC2153 and SC1090
* Restart versionning and keeping a changelog
* Add option "--version" or "-V" to show version information about this script and duplicity
0.9.x (2013-01-14 to 2016-08-31)
================================
Versionning and keeping a changelog up to date has been neglected between 2013-01-14 and 2016-08-31.
There were no official 0.9.x release, but an automatically generated list of changes that affected
`duplicity-backup.sh` or `duplicity-backup.conf.example` is available in the file `CHANGELOG_0.9.x.md`.
0.8.3 (02 January 2013)
======================
* FreeBSD portability (du, mail, & shebang) [barofsoap]
* Fix issue #30 "-s (collection-status) option not writing anything to log file"
0.8.2 (01 November 2012)
========================
* Handle --time option for restoration and file-listing
@ -13,8 +78,10 @@
0.8 (05 August 2012)
===================
* Improved argument parsing. Now the script is insensitive to the order of appearance of the options and handles correctly optional options parameters
* Re-added possibility to specify the config file on the command line, which is now the recommended way to do (facilitating script updates)
* Improved argument parsing. Now the script is insensitive to the order of appearance of the options and handles
correctly optional options parameters
* Re-added possibility to specify the config file on the command line, which is now the recommended way to do
(facilitating script updates)
* Added dry-run command line option (-n or --dry-run)
* Added many short versions of long options (-b, -f, -v, -l, -s)
* Fix "unary operator expected warning" in some rare cases
@ -34,12 +101,14 @@ Inclusion of two patches written by [shamer] + modified config file management.
* Added option to use ssmtp to send mail [shamer]
* Added lock file to prevent running multiple instances simultaneously [shamer]
* Modified config file management (no more specified on the command line, must be specified as an parameter at the beginning of the script)
* Modified config file management (no more specified on the command line, must be specified as an parameter at the
beginning of the script)
* Fixed bad check_variables() behaviour when not using Amazon S3 storage backend without commenting AWS API keys
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.
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]
@ -80,15 +149,18 @@ 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.
* 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
* 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

107
CHANGELOG_0.9.x.md Normal file
View file

@ -0,0 +1,107 @@
Between version 0.10.0 and 0.8.3, versionning had been neglected and no CHANGELOG entry was kept up to date.
Here is an export from `git log` for all changes that affected `duplicity-backup.sh` or `duplicity-backup.conf.example` between 2013-01-14 and 2016-08-31.
```
2016-08-31 23:03:09 +0200 - 73adf5d - Fixes related to new warnings coming from the new version of shellcheck
2016-08-31 17:09:28 -0300 - 6ce9a64 - Wrong identation
2016-08-31 16:36:29 -0300 - 4f96d72 - Send notification if stale lock is detected
2016-08-31 15:26:12 -0300 - 465ae13 - Add IFTTT notification service
2016-08-31 15:13:34 -0300 - c9bd2a4 - Add IFTTT notification service
2016-07-13 18:23:27 +0200 - 2f07d0e - Adding -e, --cleanup flag...
2016-07-03 01:07:08 +0200 - 1604d02 - Support mailx from mailutils
2016-06-15 13:38:18 +0200 - 7a84fbd - Fix for issue #128
2016-04-29 15:31:56 +0200 - dcdc081 - changed my mind about where to place NOTIFICATION_SERVICE
2016-04-29 15:27:40 +0200 - b90289d - minor comment changes to notifications
2016-04-28 15:58:49 -0400 - 0501d23 - fixed error
2016-04-28 21:28:54 +0200 - 6dc6d19 - Restore the functionality to specify a custom mail script
2016-04-23 14:15:09 -0400 - 3ffde78 - Adding Pushover notifications
2016-04-06 11:05:19 -0400 - a719668 - added -r flag to bash read to allow backslashes in GPG passphrases
2016-04-01 23:21:19 +0200 - fad4bd2 - Full rework of email handling
2016-03-28 23:47:39 +0200 - f3f4ddc - rework code for email and notifications (more DRY)
2016-03-28 23:21:02 +0200 - 74f637d - Typo
2016-03-25 20:40:46 +0100 - bcd64c1 - first iteration after activation of Travis-CI
2016-03-25 20:00:39 +0100 - 6c63877 - one last cleaning in the conf file with shellcheck
2016-03-25 19:47:29 +0100 - 3797960 - massive cleaning with shellcheck: from 5 errors and 200 warnings to zero
2016-03-24 21:12:17 +0100 - 454d278 - minor changes to the pull request before merging
2016-03-24 20:59:42 +0100 - 471cc9f - minor changes to the pull request before merging
2016-03-16 18:01:49 +0530 - 491b045 - Add storage class option for AWS S3 to specify storage class to be used
2016-02-26 14:56:31 +0800 - 3eabe0d - Add config sample for Slack notifications
2016-02-26 14:54:34 +0800 - fcfa9ac - Add Slack incoming webhook notifications support
2016-02-26 14:44:46 +0800 - 4fca444 - Better comment
2016-01-27 10:50:15 -0500 - ff1e827 - Adding support for custom mail scripts.
2016-01-23 15:12:03 +1100 - 931fe9e - added ftps and ftpes to list of possible destinations
2015-10-19 13:59:34 +0800 - 423a1d3 - Fix typo
2015-10-10 13:31:12 +0200 - 3a48d5a - Fix bug #106 (unary operator expected)
2015-10-08 10:15:56 +0200 - e5d5785 - also send email on cleanup failure + replace introduced tabs with spaces
2015-09-02 10:17:14 +0200 - 8985d9c - - added EMAIL_FAILURE_ONLY option to send e-mails only if there was an error while doing backup - added HOSTNAME option to inform in e-mail report for which server is this report for - e-mail subject is rewrited now to know if backup was OK or not
2015-08-17 14:58:00 -0500 - 689eb23 - add more backslashes to unweildy awk script
2015-07-29 21:56:53 +0200 - 498ac97 - Rework of duplicity-backup.conf.example, no functionality changes
2015-07-29 15:38:48 +0200 - 5bdb816 - Add OpenStack Swift support
2015-07-05 20:08:51 +0200 - 0dfa26a - change mode of script to 755
2015-06-24 13:33:06 +0200 - 0644d76 - Make tar stdin/stdout explicit in backup function
2015-05-21 09:09:10 +0200 - 19951b7 - Fix issue #94
2015-05-18 18:40:23 +0200 - a69eeaa - Delete trailing spaces
2015-05-18 18:17:34 +0200 - 4be3671 - Fix bug #93 : make message about unsupported destination disk usage more explicit
2015-05-14 16:17:20 +0200 - 2be958e - Human readable size for Google Cloud
2015-05-14 16:16:56 +0200 - 01143b6 - Size GCS with gsutil
2015-05-14 14:16:59 +0200 - 8abfd40 - Google Cloud Storage support
2015-04-20 13:33:44 -0400 - 528cc41 - Move --exclude-device-files to beginning of EXCLUDE variable
2015-04-17 08:54:36 -0500 - c8d249d - removed perl dependancy
2015-04-13 17:13:08 -0500 - 20ded18 - Appending usage information to EMAIL_SUBJECT modified: duplicity-backup.sh
2015-04-10 15:26:28 -0500 - a749d24 - Add support for getting size of remote disk connected via ssh
2015-01-27 15:23:11 +0000 - e94732a - Add destination type to disk use report and make format consistent with source du report
2015-01-27 13:13:18 +0000 - 08cb675 - improve s3cmd not installed message, ie mention PATH
2015-01-26 19:20:44 +0000 - 3fcfb22 - add s3cmd config not found to dest disk use report
2015-01-23 19:12:57 +0000 - 92a3932 - unset ftp_password variable
2015-01-23 17:02:25 +0000 - 258e68c - copy whole array rather than one element
2015-01-23 16:25:51 +0000 - ea14212 - remove not on -z INCLIST check
2015-01-21 16:29:42 +0100 - 2e6e383 - Rework on the pull request to refactor the new code
2015-01-21 15:59:42 +0100 - b34c7a5 - Include the include/exclude globbing file in the backup tarball if present
2015-01-19 20:13:52 +0000 - 6f5b0dc - My typo in code comment - du not df
2015-01-19 19:08:23 +0000 - 01ec946 - Correct log reports of file size to disk use, plus some log file formatting cleanups
2015-01-19 18:36:11 +0000 - 646f8c4 - Excluded directories were no excluded from source disk usage report - quotes issue
2015-01-19 17:17:56 +0000 - 6ccf691 - Don't skip source disk use report when INCLIST unconfigured
2015-01-18 18:01:32 +0000 - bdcb1bf - Update example config with log dir creation info
2015-01-18 14:50:35 +0000 - d3c2102 - If we create the log dir chown it to log file owner
2014-12-05 09:39:05 +1100 - 59f2339 - add an option to set the tmpdir for duplicity to use.
2014-12-05 09:30:05 +1100 - 83b7ecd - doing a collection status and file list need to eval the command (like all the other commands already do) because if you have ssh options set in your config, it causes an error ("duplicity: error: no such option: -o")
2014-08-10 03:08:38 +0200 - 7b20db3 - fix: ensure a trailing slash in log dir name
2014-06-06 12:11:58 +0300 - 456f5cd - Add a note in configuration about escaping "$" in passphrase
2014-06-06 12:09:04 +0300 - 615a988 - Add Google Docs destination to configuration
2014-06-06 12:03:18 +0300 - a148ac8 - Fix typos, remove trailing whitespace
2014-04-16 15:05:23 +0200 - 1bde60d - Add REMOVE_LOGS_OLDER_THAN parameter to the config file
2014-03-30 14:44:31 -0400 - 9f5626b - Add option to remove old log files.
2014-03-30 14:44:17 -0400 - 36f87c7 - Only change log file ownership if necessary.
2014-03-30 14:43:53 -0400 - b20f7ab - Clarification when remote size unavailable.
2014-03-04 12:22:14 +0100 - 4f90cc7 - add support for DragonFly and OpenBSD
2014-02-05 16:59:34 +0100 - 3bfd78c - duplicity-backup.sh: Fix quotation issue
2014-01-06 17:24:51 -0500 - 2209955 - dont include --sign-key when restoring w/ hidden-enc key
2014-01-03 16:25:26 -0500 - 417d526 - only cleanup if CLEAN_UP_TYPE and CLEAN_UP_VARIABLE are defined
2014-01-03 15:26:26 -0500 - 1864e3a - added HIDE_KEY_ID and SECRET_KEYRING options
2014-01-02 16:16:23 +0200 - 07c1fd2 - Added the option to skip cleanup
2013-11-22 10:32:19 +0100 - 1bd7c26 - Fixes issue zertrin/duplicity-backup/issues/41 - conf revert
2013-11-22 10:29:07 +0100 - 7d83629 - Fixes issue zertrin/duplicity-backup/issues/41
2013-11-13 21:56:12 +0100 - 54f9aaf - Complete the half-done work of previous commit
2013-11-13 21:36:34 +0100 - 03ef054 - Add the --restore-dir synonym and update the documentation accordingly
2013-11-13 20:08:34 +0100 - e9af0ab - Some little modifications and additions in the doc of the config file
2013-11-13 19:55:47 +0100 - dd05ff6 - Add support for mail sending via msmtp
2013-11-13 19:36:15 +0100 - 5c99b4c - fixed variable name (cherry picked from commit 19c80a83a2819bdac73dfe4bc08e270205a9a666)
2013-11-11 00:06:31 +0000 - 22e3904 - Renamed the --dry-run option to --debug.Created proper duplicity --dry-run command (recommended -v8, info verbosity level)
2013-08-12 11:06:09 +0200 - c3aa58b - Small improvements to the fix of cippino before merge
2013-08-02 10:52:08 +0200 - 0275cb5 - Fixed INCLIST
2013-07-22 11:59:41 +0200 - dbf78cf - Better explanation of the FTP_PASSWORD variable based on official documentation
2013-07-22 10:20:29 +0200 - 63d38be - Add notes about the difference between "mailx" and "mail" commands
2013-07-22 10:11:31 +0200 - 68931e4 - Move the new section about remove-all-inc-of-but-n-full a bit lower in the config file.
2013-07-21 19:58:46 -0500 - 9b34c04 - Adds the option to use remove-all-inc-of-but-n-full to prune incrementals of backups with long history.
2013-07-09 11:52:03 -0300 - 582416f - A small contribution with a set a ftp variable to run on a script
2013-07-07 19:03:42 +0200 - 7275aaf - sendmail error
2013-07-03 09:21:20 +0200 - 31da9c8 - Sendmail as mail command
2013-05-14 22:12:27 -0500 - e636dd4 - Fix typos.
2013-03-31 01:24:26 +0100 - 89a78ed - Be a bit more specific about configuration problems
2013-03-31 01:21:43 +0100 - 7bb45ff - Let s3cmd have the correct bucket name when using s3 scheme
2013-03-23 00:14:23 +0100 - ee1b759 - Fix issue #38 : Multiple recipients
2013-01-29 14:32:05 +0100 - bc0fa15 - Fix for du --exclude-from and mail on OS X
2013-01-14 21:25:36 +0100 - 02fae5c - Update duplicity-backup.sh
2013-01-14 01:04:56 +0100 - 6df0902 - Fix issue #33 : Allow to specify the s3cmd configuration file
```

166
README
View file

@ -1,166 +0,0 @@
ABOUT THIS SCRIPT
=================
This bash script was designed to automate and simplify the remote backup process
of duplicity on Amazon S3 primarily. Other backup destinations are possible
(FTP, SFTP, SCP, rsync, file...), i.e. any of duplicity's supported outputs.
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
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.
This version is a rewriting of the code originally written by Damon Timm,
including many patches that have been brought to the original scripts by various
forks on Github.
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/projects/duplicity-backup/
The original version of the code is availabe at:
http://github.com/theterran/dt-s3-backup
BEFORE YOU START
================
This script requires user configuration. Instructions are in the config file
itself and should be self-explanatory. Please DO NOT edit the example config
file, but make a copy of it and edit this one. Be sure to replace all the
*foobar* values with your real ones. Almost every value needs to be configured
in someway.
You can use one copy of the script with different settings for different backup
scenarios. It is designed to run as a cron job and will log information to a
text file (including remote file sizes, if you have s3cmd installed). Be sure to
make the script executable (chmod +x) before you hit the gas.
REQUIREMENTS
============
* duplicity
* gpg
* which
* Amazon S3 (optional)
* s3cmd (optional)
* mailx (optional)
CONFIGURATION
=============
The configuration takes place in a separate config file and is documented there.
You want to copy duplicity-backup.conf.example to another place that suits your
needs (for example /etc/duplicity-backup.conf)
The script looks for its configuration by reading the config file specified by
the command line option -c or --config (see USAGE)
If no config file was given on the command line, the script will try to find the
file specified in the CONFIG parameter at the beggining of the script (defaults
to "duplicity-backup.conf" in the script's directory).
So be sure either:
- to specify the configuration file path on the command line [recommended]
- or to edit the CONFIG parameter in thescript to match the actual location of
your config file. [deprecated]
NOTE: to ease future updates of the script, you may prefer NOT to edit the
script at all and to specify systematically the path to your config file
on the command line with the -c or --config option.
USAGE
=====
duplicity-backup.sh [options]
Options:
-c, --config CONFIG_FILE specify the config file to use
-b, --backup runs an incremental backup
-f, --full forces a full backup
-v, --verify verifies the backup
--restore [PATH] restores the entire backup to [path]
--restore-file [FILE_TO_RESTORE] [DESTINATION]
restore a specific file
-l, --list-current-files lists the files currently backed up in the archive
-s, --collection-status show all the backup sets in the archive
-t, --time TIME specify the time from which to restore or list
files (duplicity time format)
--backup-script automatically backup the script and secret key to
the current working directory
-n, --dry-run perform a trial run with no changes made
COMMON USAGE EXAMPLES
=====================
* View help:
$ duplicity-backup.sh
* Run an incremental backup:
$ duplicity-backup.sh [-c config_file] --backup
* Force a one-off full backup:
$ duplicity-backup.sh [-c config_file] --full
* Restore your entire backup:
$ duplicity-backup.sh [-c config_file] --restore
You will be prompted for a restore directory
$ duplicity-backup.sh [-c config_file] --restore /home/user/restore-folder
You can also provide a restore folder on the command line.
* Restore a specific file in the backup:
$ duplicity-backup.sh [-c config_file] --restore-file
You will be prompted for a file to restore to the current directory
$ duplicity-backup.sh [-c config_file] --restore-file img/mom.jpg
Restores the file img/mom.jpg to the current directory
$ duplicity-backup.sh [-c config_file] --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
$ duplicity-backup.sh [-c config_file] --list-current-files
* Verify the backup
$ duplicity-backup.sh [-c config_file] --verify
* Backup the script and gpg key (for safekeeping)
$ duplicity-backup.sh [-c config_file] --backup-script
TROUBLESHOOTING
===============
This script attempts to simplify the task of running a duplicity command; if you
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 duplicity-backup, either pass the
option -n or --dry-run on the command line, or head to the bottom of the
configuration file 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 what is being generated
is causing an error or if it is duplicity causing you woe.
NEXT VERSION WISH LIST
======================
* --restore-dir option
Thanks to Mario Santagiuliana and Razvan for their help.

281
README.md Normal file
View file

@ -0,0 +1,281 @@
[![Build Status](https://travis-ci.org/zertrin/duplicity-backup.sh.svg?branch=dev)](https://travis-ci.org/zertrin/duplicity-backup.sh)
# duplicity-backup.sh
This bash script was designed to automate and simplify the remote backup process of [duplicity](http://duplicity.nongnu.org/) on Amazon S3 primarily. Other backup destinations are possible (Google Cloud Storage, FTP, SFTP, SCP, rsync, file...), i.e. any of duplicity's supported outputs.
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 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.
This version is a rewriting of the code originally written by [Damon Timm](https://github.com/thornomad), including many patches that have been brought to the original scripts by various forks on Github. Thanks to all the contributors!
More information about this script is available at https://zertrin.org/projects/duplicity-backup/
The original version of the code is available at https://github.com/theterran/dt-s3-backup
## duplicity-backup.sh IS NOT duplicity
It is only a wrapper script for duplicity written in bash!
This means the following:
* You need to install AND configure duplicity BEFORE using duplicity-backup.sh
* [The official documentation of duplicity](http://duplicity.nongnu.org/duplicity.1.html) is relevant to duplicity-backup.sh too. Virtually any option supported by duplicity can be specified in the config file of duplicity-backup.sh. See the `STATIC_OPTIONS`, `CLEAN_UP_TYPE` and `CLEAN_UP_VARIABLE` parameters in particular.
* Before asking something about duplicity-backup.sh, ensure that your question isnt actually concerning duplicity ;) First, make sure you can perform a backup with duplicity without using this script. If you can't make the backup work with duplicity alone, the problem is probably concerning duplicity and not this script. If you manage to make a backup with duplicity alone but not with this script, then there is probably a problem with duplicity-backup.sh.
* In particular, to the question "_Does duplicity-backup.sh support the backend XXX_" (with XXX being for example Amazon Glacier), the answer is always the same: "_duplicity-backup.sh uses duplicity, so ask the developers of duplicity ;) Once it's in duplicity, it's automatically available to duplicity-backup.sh_"
## Contributing
The development version of the code is available at https://github.com/zertrin/duplicity-backup.sh in the `dev` branch. It is a bleeding-edge version with the latest changes that have not yet been tested a lot, but that's the best starting point to contribute.
Pull requests are welcome! However please **always use individual feature branches for each pull request**. I may not accept a pull request from a master or dev branch.
Here is how to do it:
Fork the repository first and then clone your fork on your machine:
git clone git@github.com:YOURNAME/duplicity-backup.sh.git duplicity-backup
cd duplicity-backup
Add a remote for the upstream repository:
git remote add upstream git@github.com:zertrin/duplicity-backup.sh.git
git fetch upstream
Create a new topic branch for the changes you want to make, based on the `dev` branch from upstream:
git checkout -b my-fix-1 upstream/dev
Make your changes, test them, commit them and push them to Github:
git push origin my-fix-1
Open a Pull request from `YOURNAME:my-fix-1` to `zertrin:dev`.
If you want to open another pull request for another change which is independent of the previous one, just create another topic branch based on master (`git checkout -b my-fix-2 upstream/dev`)
## Installation
### 1. Get the script
You can clone the repository (which makes it easy to get future updates):
git clone https://github.com/zertrin/duplicity-backup.sh.git duplicity-backup
If you prefer the stable (but old) version do:
git checkout stable
... or if you want the normal version, then:
git checkout master
... or if you like living on the edge (or need the latest bugfixes), you can stay at the development version which is automatically cloned.
Or just download the ZIP file:
| Version | Download link |
|---------------|-------------------------------------------------------------------|
| stable (old) | https://github.com/zertrin/duplicity-backup.sh/archive/stable.zip |
| normal | https://github.com/zertrin/duplicity-backup.sh/archive/master.zip |
| latest | https://github.com/zertrin/duplicity-backup.sh/archive/dev.zip |
### 2. Configure the script
This script requires user configuration. Instructions are in the config file itself and should be self-explanatory. You SHOULD NOT edit the example config file `duplicity-backup.conf.example`, but instead make a copy of it (for example to `/etc/duplicity-backup.conf`) and edit this one.
Be sure to replace all the *foobar* values with your real ones. Almost every value needs to be configured in someway.
The script looks for its configuration by reading the path to the config file specified by the command line option `-c` or `--config` (see [Usage](#usage))
If no config file was given on the command line, the script will try to find the file specified in the `CONFIG` parameter at the beginning of the script (default: `duplicity-backup.conf` in the script's directory).
So be sure to either:
* specify the configuration file path on the command line with the `-c` option **[recommended]**
* or to edit the `CONFIG` parameter in the script to match the actual location of your config file. **[deprecated]** _(will be removed in future versions of the script)_
NOTE: to ease future updates of the script, you may prefer NOT to edit the script at all and to specify systematically the path to your config file on the command line with the `-c` or `--config` option.
You can use one copy of the script and call it with different config file for different backup scenarios. It is designed to run as a cron job and will log information to a text file (including remote file sizes, if you use Amazon S3 and have `s3cmd` installed).
### Misc
Be sure to make the script executable if needed (`chmod +x`) before you hit the gas.
## Upgrade
### 1. Get the new version
If you got the script by cloning the repository, upgrading is easy:
git pull
else just download again the ZIP archive an extract it over the existing folder. (Don't forget to keep a backup of the previous folder to be able to rollback easily if needed)
### 2. Adapt the config file if needed
Then compare the example config file (`duplicity-backup.conf.example`) with your modified version (for example `/etc/duplicity-backup.conf`) and adapt your copy to reflect the changes in the example file.
There are many ways to do so, here are some examples (adapt the path to your actual files):
diff duplicity-backup.conf.example /etc/duplicity-backup.conf
vimdiff duplicity-backup.conf.example /etc/duplicity-backup.conf
## Dependencies
* [duplicity](http://duplicity.nongnu.org/)
* Basic utilities like: [bash](https://www.gnu.org/software/bash/), [which](http://unixhelp.ed.ac.uk/CGI/man-cgi?which), [find](https://www.gnu.org/software/findutils/) and [tee](http://linux.die.net/man/1/tee) (should already be available on most Linux systems)
* [gpg](https://www.gnupg.org/) *`optional`* (if using encryption)
* [mailx](http://linux.die.net/man/1/mailx) *`optional`* (if sending mail is activated in the script)
For the [Amazon S3](https://aws.amazon.com/s3/) storage backend *`optional`*
* [s3cmd](http://s3tools.org/s3cmd) *`optional`*
For the [Backblaze B2](https://www.backblaze.com/b2) storage backend *`optional`*
* [python-b2](https://pypi.python.org/pypi/b2) *`optional`*
For the [Google Cloud Storage](https://cloud.google.com/storage/) storage backend *`optional`*
* [boto](https://github.com/boto/boto) (may already have been installed with duplicity)
* [gsutil](https://cloud.google.com/storage/docs/gsutil) *`optional`*
## Usage
duplicity-backup.sh [options]
Options:
-c, --config CONFIG_FILE specify the config file to use
-b, --backup runs an incremental backup
-f, --full forces a full backup
-v, --verify verifies the backup
-e, --cleanup cleanup the backup (eg. broken sessions), by default using
duplicity --force flag, use --dry-run to actually log what
will be cleaned up without removing (see man duplicity
> ACTIONS > cleanup for details)
-l, --list-current-files lists the files currently backed up in the archive
-s, --collection-status show all the backup sets in the archive
--restore [PATH] restores the entire backup to [path]
--restore-file [FILE_TO_RESTORE] [DESTINATION]
restore a specific file
--restore-dir [DIR_TO_RESTORE] [DESTINATION]
restore a specific directory
-t, --time TIME specify the time from which to restore or list files
(see duplicity man page for the format)
--backup-script automatically backup the script and secret key(s) to
the current working directory
-n, --dry-run perform a trial run with no changes made
-d, --debug echo duplicity commands to logfile
-V, --version print version information about this script and duplicity
## Usage Examples
**View help:**
duplicity-backup.sh
**Run an incremental backup:**
duplicity-backup.sh [-c config_file] --backup
**Force a one-off full backup:**
duplicity-backup.sh [-c config_file] --full
**Restore your entire backup:**
# You will be prompted for a restore directory
duplicity-backup.sh [-c config_file] --restore
# You can also provide a restore folder on the command line.
duplicity-backup.sh [-c config_file] --restore /home/user/restore-folder
**Restore a specific file or directory in the backup:**
Note that the commands `--restore-file` and `--restore-dir` are equivalent.
# You will be prompted for a file to restore to the current directory
duplicity-backup.sh [-c config_file] --restore-file
# Restores the file img/mom.jpg to the current directory
duplicity-backup.sh [-c config_file] --restore-file img/mom.jpg
# Restores the file img/mom.jpg to /home/user/i-love-mom.jpg
duplicity-backup.sh [-c config_file] --restore-file img/mom.jpg /home/user/i-love-mom.jpg
# Restores the directory rel/dir/path to /target/restorepath
duplicity-backup.sh [-c config_file] --restore-dir rel/dir/path /target/restorepath
**List files in the remote archive**
duplicity-backup.sh [-c config_file] --list-current-files
**See the collection status (i.e. all the backup sets in the remote archive)**
duplicity-backup.sh [-c config_file] --collection-status
**Verify the backup**
duplicity-backup.sh [-c config_file] --verify
**Clean the backup**
duplicity-backup.sh [-c config_file] --cleanup
**Backup the script and gpg key in a encrypted tarfile (for safekeeping)**
duplicity-backup.sh [-c config_file] --backup-script
## Cron Usage Example (backup)
41 3 * * * /absolute/path/to/duplicity-backup.sh -c /etc/duplicity-backup.conf -b
## Cron Usage Example (cleanup)
41 4 * * 1 /absolute/path/to/duplicity-backup.sh -c /etc/duplicity-backup.conf -e
## Known issues
### GPG error if system locale is not english
If your system's locale is not english, an error can happen when duplicity is trying to encrypt the files with gpg. This problem concerns duplicity and has been reported upstream ([see bug report](https://bugs.launchpad.net/duplicity/+bug/510625)). A simple workaround is to set the following environement variable: `LANG=C`. For example: `LANG=C duplicity-backup.sh [-c config_file] ...` or in the cron `41 3 * * * LANG=C /absolute/path/to/duplicity-backup.sh -c /etc/duplicity-backup.conf -b`
### "/dev/fd/62: Operation not supported" errors on FreeBSD
See [issue #143](https://github.com/zertrin/duplicity-backup.sh/issues/143) for a fix.
## Troubleshooting
This script attempts to simplify the task of running a duplicity command; if you 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 duplicity-backup.sh, either pass the option `-d` or `--debug` on the command line, or head to the bottom of the configuration file 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 what is being generated is causing an error or if it is duplicity causing you woe.
You can also try the `-n` or `--dry-run` option. This will make duplicity to calculate what would be done, but does not perform any backend actions. Together with info verbosity level (-v8) duplicity will list all files that will be affected. This way you will know exactly which files will be backed up or restored.
## Wish List
* Backup to multiple destinations with one config file
* Show backup-ed files in today incremental backup email
###### Thanks to all the [contributors](https://github.com/zertrin/duplicity-backup.sh/graphs/contributors) for their help.

View file

@ -2,7 +2,7 @@
#
# Copyright (c) 2008-2010 Damon Timm.
# Copyright (c) 2010 Mario Santagiuliana.
# Copyright (c) 2012 Marc Gallet.
# Copyright (c) 2012-2018 Marc Gallet.
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
@ -20,10 +20,13 @@
# MORE ABOUT THIS SCRIPT AVAILABLE IN THE README AND AT:
#
# http://zertrin.org/projects/duplicity-backup/ (for this version)
# http://damontimm.com/code/dt-s3-backup (for the original programi by Damon Timm)
# http://damontimm.com/code/dt-s3-backup (for the original program by Damon Timm)
#
# Latest code available at:
# http://github.com/zertrin/duplicity-backup
# http://github.com/zertrin/duplicity-backup.sh
#
# List of contributors:
# https://github.com/zertrin/duplicity-backup.sh/graphs/contributors
#
# ---------------------------------------------------------------------------- #
@ -32,20 +35,231 @@
# #############################################
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# ! DO NOT edit duplicity-backup.conf.example !
# ! DO NOT edit this file! !
# ! (duplicity-backup.conf.example) !
# ! please copy it to anywhere you want !
# ! (typically duplicity-backup.conf) !
# ! and edit this file instead !
# ! and edit that copy instead !
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# AMAZON S3 INFORMATION
# Comment out this lines if you're not using Amazon S3
AWS_ACCESS_KEY_ID="foobar_aws_key_id"
AWS_SECRET_ACCESS_KEY="foobar_aws_access_key"
# .............
# . WARNING .
# .............
#
# duplicity-backup.sh IS NOT duplicity!
#
# It is only a wrapper script for duplicity written in bash!
#
# This means the following:
#
# * You need to install and configure duplicity BEFORE using duplicity-backup.sh
#
# * The official documentation of duplicity (http://duplicity.nongnu.org/duplicity.1.html)
# is relevant to duplicity-backup.sh too. Virtually any option supported
# by duplicity can be specified in the config file of duplicity-backup.sh.
# See the `STATIC_OPTIONS`, `CLEAN_UP_TYPE` and `CLEAN_UP_VARIABLE` parameters in particular.
#
# * Before asking something about duplicity-backup.sh, ensure that your question
# isn't actually concerning duplicity ;)
# First, make sure you can perform a backup with duplicity without using this script.
# If you can't make the backup work with duplicity alone, the problem is probably
# concerning duplicity and not this script. If you manage to make a backup with duplicity
# alone but not with this script, then there is probably a problem with duplicity-backup.sh.
# ------------------------------------------------------------------------------
# BACKUP SOURCE INFORMATION
# ------------------------------------------------------------------------------
#
# The ROOT of your backup (where you want the backup to start);
# This can be / or somewhere else -- I use /home/ because all the
# directories that I want to backup start with /home/.
#
ROOT='/home'
# Set hostname for this duplicity instance, useful for e-mail reports
#
HOSTNAME=$(hostname -f)
# ------------------------------------------------------------------------------
# BACKUP DESTINATION INFORMATION
# ------------------------------------------------------------------------------
# In my case, I use Amazon S3 use this - so I made up a unique
# bucket name (you don't have to have one created, it will do it
# for you). If you don't want to use Amazon S3, you can backup
# to a file or any of duplicity's supported outputs.
#
# The s3+http scheme uses the default aws s3 hostname.
# Use s3://host/bucket/[backup-folder/] if you want to specify the host name.
# If using the s3://... scheme and you have s3cmd installed, be sure to change
# 's3.amazonaws.com' to the appropriate host in your .s3cfg file so that the
# remote file size check will work.
#DEST="s3://host/backup-bucket/backup-folder/"
DEST="s3+http://foobar-backup-bucket/backup-folder/"
# Other possible locations
# Be sure to check duplicity's man page to know how to use them
# (http://duplicity.nongnu.org/duplicity.1.html)
#
#DEST="gs://foobar-backup-bucket/backup-folder/"
#DEST="ftp://user[:password]@other.host[:port]/some_dir"
#DEST="ftps://user[:password]@other.host[:port]/some_dir"
#DEST="ftpes://user[:password]@other.host[:port]/some_dir"
#DEST="rsync://user@host.com[:port]//absolute_path"
#DEST="scp://user[:password]@other.host[:port]/[/]some_dir"
#DEST="sftp://user[:password]@other.host[:port]/[/]some_dir"
#DEST="file:///home/foobar_user_name/new-backup-test/"
#DEST="imap[s]://user[:password]@host.com[/from_address_prefix]"
#DEST="webdav[s]://user[:password]@other.host[:port]/some_dir"
#DEST="gdocs://foobar_google_account/some_dir"
#DEST="swift://foobar_swift_container/some_dir"
#DEST="dpbx:///foobar_swift_container/some_dir"
#DEST="b2://some_account_id[:some_application_key]@some_bucket_name/some_dir"
# ------------------------------------------------------------------------------
# DESTINATION BACKEND PASSWORD
# ------------------------------------------------------------------------------
# Instead of setting the password needed for the backup destination in the
# DEST url, you can supply it in the FTP_PASSWORD variable below, which is
# used by most, if not all backends, regardless of its name.
# Duplicity's official documentation states:
# "Supported by most backends which are password capable. More secure than
# setting it in the backend url (which might be readable in the operating
# systems process listing to other users on the same machine)."
#
#FTP_PASSWORD='password'
# ------------------------------------------------------------------------------
# AMAZON S3 INFORMATION
# ------------------------------------------------------------------------------
# Uncomment these lines if you're using Amazon S3
#
#AWS_ACCESS_KEY_ID="foobar_aws_key_id"
#AWS_SECRET_ACCESS_KEY="foobar_aws_access_key"
#
# SET STORAGE CLASS for AWS
# The default storage class is STANDARD STORAGE. You can comment this option if
# want to go with standard. The other storage options are --s3-use-ia and --s3-use-rrs.
# Note: --s3-use-ia option is supported only in duplicity version greater than 0.7.06
#
#STORAGECLASS="--s3-use-ia"
#
# S3CMD INFORMATION
# Most people don't need this, but in some cases
# you may want to specify a custom configuration file
# to pass to s3cmd. If so, set the S3CMD_CONF_FILE variable
# to the full path of this custom config file.
# Per default s3cmd uses ${HOME}/.s3cfg
#
#S3CMD_CONF_FILE='/path/to/your/s3cmd/conf/file'
# ------------------------------------------------------------------------------
# GOOGLE CLOUD STORAGE INFORMATION
# ------------------------------------------------------------------------------
# Uncomment these lines if you're using Google Cloud storage
#
#GS_ACCESS_KEY_ID="foobar_gcs_key_id"
#GS_SECRET_ACCESS_KEY="foobar_gcs_secret_id"
# ------------------------------------------------------------------------------
# OPENSTACK OBJECT STORAGE (SWIFT) INFORMATION
# ------------------------------------------------------------------------------
# Uncomment these lines if you're using OpenStack Object Storage (Swift)
#
#SWIFT_USERNAME="foobar_swift_tenant:foobar_swift_username"
#SWIFT_PASSWORD="foobar_swift_password"
#SWIFT_AUTHURL="foobar_swift_authurl"
#SWIFT_AUTHVERSION="2"
# ------------------------------------------------------------------------------
# DROPBOX INFORMATION
# ------------------------------------------------------------------------------
# Uncomment these lines if you're using Dropbox
#
#DPBX_ACCESS_TOKEN="foobar_dropbox_access_token"
# ------------------------------------------------------------------------------
# INCLUDE LIST OF DIRECTORIES
# ------------------------------------------------------------------------------
# Here is a list of directories to include; if you want to include
# everything that is in ROOT, leave this list empty.
#
# Here is an example with multiple locations:
#
#INCLIST=( '/home/*/Documents' \
# '/home/*/Projects' \
# '/home/*/logs' \
# '/home/www/mysql-backups' \
# )
#
# Simpler example with one location:
INCLIST=( '/home/foobar_user_name/Documents/' )
# ------------------------------------------------------------------------------
# EXCLUDE LIST OF DIRECTORIES
# ------------------------------------------------------------------------------
# Even though I am being specific about what I want to include,
# there is still a lot of stuff I don't need.
# If you don't want to exclude anything, leave this list empty.
#
# Here is an example with multiple locations:
#
#EXCLIST=( '/home/*/Trash' \
# '/home/*/Projects/Completed' \
# '/**.DS_Store' \
# '/**Icon?' \
# '/**.AppleDouble' \
# )
#
# If you don't want to exclude anything, use EXCLIST=()
#
# Simpler example with one location. Adapt it to your needs.
EXCLIST=( '/home/foobar_user_name/Documents/foobar-to-exclude' )
# ------------------------------------------------------------------------------
# INCLUDE GLOBBING FILELIST
# ------------------------------------------------------------------------------
# Instead of using the INCLIST/EXCLIST variable you can also define a special
# (text-)file where each line in the filelist will be interpreted as
# a globbing pattern. By using the '+' or '-' sign at the beginning of each line
# you are able to specify if the folder should be included or excluded.
#
# Example:
# + /dir/foo
# - /dir/foob*
# + /dir/*
#
# From the duplicity manual:
# Lines starting with "+" are interpreted as include directives[...]Similarly, lines starting with "-" exclude files even if they are found within an include filelist.
# For more examples or information refer to http://duplicity.nongnu.org/duplicity.1.html#sect10
#
#INCEXCFILE=/path/to/file
# ------------------------------------------------------------------------------
# EXCLUDE DEVICE FILES
# ------------------------------------------------------------------------------
# Exclude all device files. This can be useful for security/permissions reasons
# or if device files are not handled correctly.
#
#EXDEVICEFILES=1
# ------------------------------------------------------------------------------
# ENCRYPTION INFORMATION
# ------------------------------------------------------------------------------
#
# Do you want your backup to be encrypted? yes/no
# If yes, please make sure you specify either PASSPHRASE or GPG_ENC_KEY/GPG_SIGN_KEY
ENCRYPTION='yes'
# If you are NOT running this from a cron, comment this line out
@ -54,7 +268,9 @@ ENCRYPTION='yes'
# (your backups will be encrypted with this password) or is used
# for the "GPG_SIGN_KEY" (see below).
# Comment out if you aren't using encryption
PASSPHRASE="foobar_gpg_passphrase"
# Note: if you have a ' in your passphrase, escape it accordingly.
PASSPHRASE='foobar_gpg_passphrase'
# Specify which GPG keys you would like to use (even if you have only one).
# If you are running this from a cron, it is highly recommended to create separate
@ -67,108 +283,183 @@ PASSPHRASE="foobar_gpg_passphrase"
# in GPG_ENC_KEY and GPG_SIGN_KEY.
# Comment out if you're using only PASSPHRASE (symmetric encryption) or not using
# encryption at all.
GPG_ENC_KEY="foobar_gpg_key"
GPG_SIGN_KEY="foobar_gpg_key"
# BACKUP SOURCE INFORMATION
# The ROOT of your backup (where you want the backup to start);
# This can be / or somwhere else -- I use /home/ because all the
# directories start with /home/ that I want to backup.
ROOT="/home"
# BACKUP DESTINATION INFORMATION
# In my case, I use Amazon S3 use this - so I made up a unique
# bucket name (you don't have to have one created, it will do it
# for you). If you don't want to use Amazon S3, you can backup
# to a file or any of duplicity's supported outputs.
# Do you want to hide the key id of the encrypted files? yes/no
# It uses the gpg's --hidden-recipient command to obfuscate the owner of the backup.
# On restore, gpg will automatically try all available secret keys in order to
# decrypt the backup. See gpg(1) for more details.
#
# NOTE: You do need to keep the "s3+http://<your location>/" format
# even though duplicity supports "s3://<your location>/".
DEST="s3+http://backup-bucket/backup-folder/"
# Other possible locations
#DEST="ftp://user[:password]@other.host[:port]/some_dir"
#DEST="rsync://user@host.com[:port]//absolute_path"
#DEST="scp://user[:password]@other.host[:port]/[/]some_dir"
#DEST="ssh://user[:password]@other.host[:port]/[/]some_dir"
#DEST="file:///home/foobar_user_name/new-backup-test/"
# HIDE_KEY_ID='yes'
# INCLUDE LIST OF DIRECTORIES
# Here is a list of directories to include; if you want to include
# everything that is in root, you could leave this list empty (I think).
# You can optionally specify the secret keyring file to use for the encryption and
# signing keys. If not specified, the default secret keyring is used which is
# usually located at ~/.gnupg/secring.gpg
#
# Here is an example with multiple locations:
#INCLIST=( "/home/*/Documents" \
# "/home/*/Projects" \
# "/home/*/logs" \
# "/home/www/mysql-backups" \
# )
#
# Simpler example with one location:
INCLIST=( "/home/foobar_user_name/Documents/Prose/" )
#SECRET_KEYRING="/home/foobar_user_name/.gnupg/duplicity.gpg
# EXCLUDE LIST OF DIRECTORIES
# Even though I am being specific about what I want to include,
# there is still a lot of stuff I don't need.
EXCLIST=( "/home/*/Trash" \
"/home/*/Projects/Completed" \
"/**.DS_Store" "/**Icon?" "/**.AppleDouble" \
)
# Here you can specify options that will be passed to GPG.
# If you can, avoid using quotes here, as it hasn't been tested much yet.
# You shouldn't need to remove the following default (--no-show-photos)
# For example an user reported (GitHub issue #145) that since gnupg v2.1,
# the option "--pinentry-mode loopback" is necessary,
# then set GPG_OPTIONS="--no-show-photos --pinentry-mode loopback"
GPG_OPTIONS="--no-show-photos"
# ------------------------------------------------------------------------------
# STATIC BACKUP OPTIONS
# ------------------------------------------------------------------------------
#
# Here you can define the static backup options that you want to run with
# duplicity. Reference is the manpage of duplicity (available at
# http://duplicity.nongnu.org/duplicity.1.html for example)
# Useful examples are `--full-if-older-than` option and (for those using
# Amazon S3 in Europe) `--s3-use-new-style` and `--s3-european-buckets` options
# Be sure to separate your options with appropriate spacing.
STATIC_OPTIONS="--full-if-older-than 14D --s3-use-new-style"
# ------------------------------------------------------------------------------
# FULL BACKUP & REMOVE OLDER THAN SETTINGS
# ------------------------------------------------------------------------------
#
# Because duplicity will continue to add to each backup as you go,
# it will eventually create a very large set of files. Also, incremental
# backups leave room for problems in the chain, so doing a "full"
# backup every so often isn't not a bad idea.
# backup every so often is not a bad idea.
#
# You can remove older than a specific time period:
#
# You can either remove older than a specific time period:
#CLEAN_UP_TYPE="remove-older-than"
#CLEAN_UP_VARIABLE="31D"
#
# Or, If you would rather keep a certain (n) number of full backups (rather
# than removing the files based on their age), you can use what I use:
CLEAN_UP_TYPE="remove-all-but-n-full"
CLEAN_UP_VARIABLE="2"
CLEAN_UP_TYPE="remove-all-but-n-full"
CLEAN_UP_VARIABLE="4"
# The third option is to skip cleanup altogether, by:
#
#CLEAN_UP_TYPE="none"
#
# In combination with "remove-older-than" clean-up type, you may want
# to keep only the full backups older than (n) number backup sets. For example,
# let's say you set to CLEAN_UP_TYPE="remove-older-than", CLEAN_UP_VARIABLE
# to "6M" (six months), STATIC_OPTIONS to "--full-if-older-than 7D"
# (a full backup every 7 days), and you execute duplicity-backup once a day.
# After six months you'll have 25 full backups, each with daily incrementals
# in between. Perhaps you're keeping the backups past 1 month "just in case",
# and so the older incrementals are overkill - weekly full backups beyond
# one month backward would suffice. In this case you can set
# "REMOVE_INCREMENTALS_OLDER_THAN to, say, "4" which will delete the
# incrementals for backup sets beyond the four most recent, keeping
# only the full weekly backups for those backup sets. The incrementals
# for the four most recent backup sets remain untouched.
#
#REMOVE_INCREMENTALS_OLDER_THAN="4"
# ------------------------------------------------------------------------------
# LOGFILE INFORMATION DIRECTORY
# Provide directory for logfile, ownership of logfile, and verbosity level.
# ------------------------------------------------------------------------------
#
# Provide directory for logfile, ownership of logfile & directory, and verbosity level.
# I run this script as root, but save the log files under my user name --
# just makes it easier for me to read them and delete them as needed.
LOGDIR="/home/foobar_user_name/logs/test2/"
LOG_FILE="duplicity-`date +%Y-%m-%d_%H-%M`.txt"
LOG_FILE="duplicity-$(date +%Y-%m-%d_%H-%M).txt"
LOG_FILE_OWNER="foobar_user_name:foobar_user_name"
# Note that if the configured LOGDIR does not exist it will be created
# and its owner:group set to that of the configured LOG_FILE_OWNER.
# If the configured LOGDIR already exists no change to owner:group is attempted.
#
#REMOVE_LOGS_OLDER_THAN='30' # (days) uncomment to activate
VERBOSITY="-v3"
# Set the tmpdir for duplicity to use.
#TMPDIR="/tmp"
# ------------------------------------------------------------------------------
# EMAIL ALERT (*thanks: rmarescu*)
# Provide an email address to receive the logfile by email. If no email
# address is provided, no alert will be sent.
# ------------------------------------------------------------------------------
#
# Provide an email address to receive the logfile by email. If EMAIL_TO is not
# 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: "duplicity-backup Alert ${LOG_FILE}"
# MTA used: mailx
#EMAIL="admin@example.com"
#EMAIL_TO="admin@example.com"
EMAIL_TO=
EMAIL_FROM=
EMAIL_SUBJECT=
EMAIL_FAILURE_ONLY="yes" # send e-mail only if there was an error while creating backup
# command to use to send mail
MAIL="mailx"
#MAIL="mail"
MAIL="mailx" # default command for Linux mail
#MAIL="mail" # for CentOS, if "mailx" fails try this one
#MAIL="ssmtp"
#MAIL="sendmail"
#MAIL="msmtp"
# TROUBLESHOOTING: If you are having any problems running this script it is
# You may specify a custom mail script instead. It will be called with
# the following convention:
# MAIL "SUBJECT OF MESSAGE" "TO EMAIL ADDRESS" "FROM EMAIL ADDRESS"
# The email body will be available on stdin.
#
#MAIL="/path/to/custom/mail_script.py"
# ------------------------------------------------------------------------------
# NOTIFICATIONS
# ------------------------------------------------------------------------------
#
# Third-party notification services. If NOTIFICATION_SERVICE is not provided, no
# notifications will be sent.
# Possible values for NOTIFICATION_SERVICE are: slack, pushover, ifttt, telegram
NOTIFICATION_SERVICE=""
NOTIFICATION_FAILURE_ONLY="yes" # send notifications only if there was an error while creating backup
# Provider: Slack
SLACK_HOOK_URL="https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
SLACK_CHANNEL="#general"
SLACK_USERNAME="duplicity-backup"
SLACK_EMOJI="package"
# Provider: Pushover
PUSHOVER_TOKEN="" # App token generated at pushover.net
PUSHOVER_USER="" # User key from pushover.net
# Provider: IFTTT
IFTTT_KEY="" # Key for MAKER channel at IFTTT
IFTTT_MAKER_EVENT="duplicity" # name the event to trigger at IFTTT Maker Channel
IFTTT_HOOK_URL="https://maker.ifttt.com/trigger/$IFTTT_MAKER_EVENT/with/key/$IFTTT_KEY" # ONLY change this if IFTTT changes it
IFTTT_VALUE2="" # general purpose value to pass to your maker channel (optional)
# Provider: Telegram
TELEGRAM_CHATID="" #Generate a Telegram bot following guide: https://core.telegram.org/bots#3-how-do-i-create-a-bot
TELEGRAM_KEY=""
# ------------------------------------------------------------------------------
# TROUBLESHOOTING
# ------------------------------------------------------------------------------
#
# If you are having any problems running this script it is
# helpful to see the command output that is being generated to determine if the
# script is causing a problem or if it is an issue with duplicity (or your
# setup). Simply uncomment the ECHO line below and the commands will be
# printed to the logfile. This way, you can see if the problem is with the
# script or with duplicity.
#
#ECHO=$(which echo)

File diff suppressed because it is too large Load diff