|
@@ -68,6 +68,14 @@ if [ -f /root/dbpass ]; then
|
68
|
68
|
DATABASE_PASSWORD=$(cat /root/dbpass)
|
69
|
69
|
fi
|
70
|
70
|
|
|
71
|
+function set_obnam_client_name {
|
|
72
|
+ # obnam can backup multiple machines with different domain names to
|
|
73
|
+ # a repository. To be able to restore directories from different
|
|
74
|
+ # machines we need to enforce a single client name for all backups
|
|
75
|
+ echo '[config]' > /etc/obnam.conf
|
|
76
|
+ echo "client-name = ${PROJECT_NAME}" >> /etc/obnam.conf
|
|
77
|
+}
|
|
78
|
+
|
71
|
79
|
function suspend_site {
|
72
|
80
|
# suspends a given website
|
73
|
81
|
if [[ $ENABLE_VERIFICATION != "yes" ]]; then
|
|
@@ -217,6 +225,7 @@ function backup_directory_to_usb {
|
217
|
225
|
if [ ! -d $USB_MOUNT/backup/${2} ]; then
|
218
|
226
|
mkdir -p $USB_MOUNT/backup/${2}
|
219
|
227
|
fi
|
|
228
|
+ set_obnam_client_name
|
220
|
229
|
obnam force-lock -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}
|
221
|
230
|
obnam backup -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}
|
222
|
231
|
if [[ $ENABLE_VERIFICATION == "yes" ]]; then
|