3a307e371b057782659d4537c6992232a6e7698d
- Author
- Damon Timm <damontimm@gmail.com>
- Committer
- Damon Timm <damontimm@gmail.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/AUTHORS b/AUTHORS
2index 71475a0359ec44f1b97a469bae335d314d8353be..f8455baef3c8a8cec760abbe921b7fde52ffd0a5 100644
3--- a/AUTHORS
4+++ b/AUTHORS
5@@ -1,2 +1,3 @@
6 Damon Timm <damontimm@gmail.com> <http://blog.damontimm.com>
7 Mario Santagiuliana <mario@marionline.it> <http://www.marionline.it>
8+Razvan <http://github.com/rmarescu>
9diff --git a/README b/README
10index 3cb90bb3e49438cd816605893bbe4fd796fd48e0..9f5b54d1986a7c64eed519243c47f541ca07ce6b 100644
11--- a/README
12+++ b/README
13@@ -11,8 +11,8 @@ Most importantly, you can easily backup the script and your gpg key in a
14 convenient passphrase-encrypted file. This comes in in handy if/when your
15 machine ever does go belly up.
16
17-Optionally, you can set up an email address where the log file will be sent.
18-Useful when the script is used via cron.
19+Optionally, you can set up an email address where the log file will be sent,
20+which is useful when the script is used via cron.
21
22 More information about this script avaiable at:
23 http://damontimm.com/code/dt-s3-backup
24@@ -80,6 +80,21 @@ COMMON USAGE EXAMPLES
25 * Backup the script and gpg key (for safekeeping)
26 $ dt-s3-backup.sh --backup-script
27
28+TROUBLESHOOTING
29+===============
30+
31+This script attempts to simplify the task of running a duplicity command; if you
32+are having any problems with the script the first step is to determine if the
33+script is generating an incorrect command or if duplicity itself is
34+causing your error.
35+
36+To see exactly what is happening when you run dt-s3-backup, head to the bottom
37+of the user configuration portion of the script and uncomment the `ECHO=$(which
38+echo)` variable. This will stop the script from running and will, instead,
39+output the generated command into your log file. You can then check to see if
40+what is being generated is causing an error or if it is duplicity causing you
41+woe.
42+
43 NEXT VERSION WISH LIST
44 ======================
45
46@@ -87,4 +102,4 @@ NEXT VERSION WISH LIST
47 * restore files from a specific time period
48 * support multiple MTAs for the email alert feature
49
50-Thanks to Mario Santagiuliana for his help.
51+Thanks to Mario Santagiuliana and Razvan for their help.
52diff --git a/dt-s3-backup.sh b/dt-s3-backup.sh
53index e38efa8dad1247228019d27d594ff1b0c8bafa7e..7322784d4f58d28e05391bbb7b61ffeaba95d771 100755
54--- a/dt-s3-backup.sh
55+++ b/dt-s3-backup.sh
56@@ -1,6 +1,6 @@
57-#!/bin/bash
58-#
59-# Copyright (c) 2008-2010 Damon Timm.
60+#!/bin/bash
61+#
62+# Copyright (c) 2008-2010 Damon Timm.
63 # Copyright (c) 2010 Mario Santagiuliana.
64 #
65 # This program is free software: you can redistribute it and/or modify it under
66@@ -34,14 +34,14 @@ export PASSPHRASE="foobar_gpg_passphrase"
67 GPG_KEY="foobar_gpg_key"
68
69 # The ROOT of your backup (where you want the backup to start);
70-# This can be / or somwhere else -- I use /home/ because all the
71+# This can be / or somwhere else -- I use /home/ because all the
72 # directories start with /home/ that I want to backup.
73 ROOT="/home/"
74
75 # BACKUP DESTINATION INFORMATION
76 # In my case, I use Amazon S3 use this - so I made up a unique
77 # bucket name (you don't have to have one created, it will do it
78-# for you). If you don't want to use Amazon S3, you can backup
79+# for you). If you don't want to use Amazon S3, you can backup
80 # to a file or any of duplicity's supported outputs.
81 #
82 # NOTE: You do need to keep the "s3+http://<your location>/" format
83@@ -50,23 +50,26 @@ ROOT="/home/"
84 DEST="file:///home/foobar_user_name/new-backup-test/"
85
86 # INCLUDE LIST OF DIRECTORIES
87-# Here is a list of directories to include; if you want to include
88+# Here is a list of directories to include; if you want to include
89 # everything that is in root, you could leave this list empty (I think).
90-#INCLIST=( "/home/*/Documents" \
91-# "/home/*/Projects" \
92-# "/home/*/logs" \
93-# "/home/www/mysql-backups" \
94-# )
95-
96-INCLIST=( "/home/foobar_user_name/Documents/Prose/" ) # small dir for testing
97+#
98+# Here is an example with multiple locations:
99+#INCLIST=( "/home/*/Documents" \
100+# "/home/*/Projects" \
101+# "/home/*/logs" \
102+# "/home/www/mysql-backups" \
103+# )
104+#
105+# Simpler example with one location:
106+INCLIST=( "/home/foobar_user_name/Documents/Prose/" )
107
108 # EXCLUDE LIST OF DIRECTORIES
109-# Even though I am being specific about what I want to include,
110-# there is still a lot of stuff I don't need.
111-EXCLIST=( "/home/*/Trash" \
112- "/home/*/Projects/Completed" \
113- "/**.DS_Store" "/**Icon?" "/**.AppleDouble" \
114- )
115+# Even though I am being specific about what I want to include,
116+# there is still a lot of stuff I don't need.
117+EXCLIST=( "/home/*/Trash" \
118+ "/home/*/Projects/Completed" \
119+ "/**.DS_Store" "/**Icon?" "/**.AppleDouble" \
120+ )
121
122 # STATIC BACKUP OPTIONS
123 # Here you can define the static backup options that you want to run with
124@@ -77,7 +80,7 @@ STATIC_OPTIONS="--full-if-older-than 14D --s3-use-new-style"
125
126 # FULL BACKUP & REMOVE OLDER THAN SETTINGS
127 # Because duplicity will continue to add to each backup as you go,
128-# it will eventually create a very large set of files. Also, incremental
129+# it will eventually create a very large set of files. Also, incremental
130 # backups leave room for problems in the chain, so doing a "full"
131 # backup every so often isn't not a bad idea.
132 #
133@@ -85,26 +88,26 @@ STATIC_OPTIONS="--full-if-older-than 14D --s3-use-new-style"
134 #CLEAN_UP_TYPE="remove-older-than"
135 #CLEAN_UP_VARIABLE="31D"
136
137-# Or, If you would rather keep a certain (n) number of full backups (rather
138+# Or, If you would rather keep a certain (n) number of full backups (rather
139 # than removing the files based on their age), you can use what I use:
140 CLEAN_UP_TYPE="remove-all-but-n-full"
141 CLEAN_UP_VARIABLE="2"
142
143 # LOGFILE INFORMATION DIRECTORY
144 # Provide directory for logfile, ownership of logfile, and verbosity level.
145-# I run this script as root, but save the log files under my user name --
146-# just makes it easier for me to read them and delete them as needed.
147+# I run this script as root, but save the log files under my user name --
148+# just makes it easier for me to read them and delete them as needed.
149
150 LOGDIR="/home/foobar_user_name/logs/test2/"
151 LOG_FILE="duplicity-`date +%Y-%m-%d_%H-%M`.txt"
152 LOG_FILE_OWNER="foobar_user_name:foobar_user_name"
153 VERBOSITY="-v3"
154
155-# EMAIL ALERT