Forget backups

This commit is contained in:
Bob Mottram 2015-11-04 22:13:25 +00:00
parent 74e5eef3fd
commit e96f2aea05
1 changed files with 9 additions and 8 deletions

View File

@ -2469,7 +2469,8 @@ function backup_directory_to_usb {
echo -n "}' | awk -F '/' '{print " >> /usr/bin/$BACKUP_SCRIPT_NAME
echo -n '$2' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo "}')" >> /usr/bin/$BACKUP_SCRIPT_NAME
echo " obnam forget --keep=${BACKUP_MAX_DAYS}d -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}" >> /usr/bin/$BACKUP_SCRIPT_NAME
echo -n " obnam forget --keep=${BACKUP_MAX_DAYS}d " >> /usr/bin/$BACKUP_SCRIPT_NAME
echo '-r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' obnam backup -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_SCRIPT_NAME
else
# For rsyncrypto usage see http://archive09.linux.com/feature/125322
@ -2615,7 +2616,7 @@ function create_backup_script {
echo ' backup_directory_to_usb /etc/letsencrypt letsencrypt' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME
if grep -Fxq "install_gnu_social" $COMPLETION_FILE; then
BACKUP_INCLUDES_DATABASES="yes"
echo 'backup_database gnusocial' >> /usr/bin/$BACKUP_SCRIPT_NAME
@ -3976,8 +3977,8 @@ function backup_directory_to_friend {
echo -n '$2' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo "}')" >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo -n " obnam forget --keep=${BACKUP_MAX_DAYS}d " >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo '-r $SERVER_DIRECTORY/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo -n " obnam forget --keep=${BACKUP_MAX_DAYS}d " >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo '-r $SERVER_DIRECTORY/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' obnam backup -r $SERVER_DIRECTORY/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}' >> /usr/bin/$BACKUP_SCRIPT_NAME
else
# For rsyncrypto usage see http://archive09.linux.com/feature/125322
@ -4115,7 +4116,7 @@ function backup_to_friends_servers {
echo ' backup_directory_to_friend /etc/letsencrypt letsencrypt' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo 'fi' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo '' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
if grep -Fxq "install_gnu_social" $COMPLETION_FILE; then
BACKUP_INCLUDES_DATABASES="yes"
echo 'backup_database_to_friend gnusocial' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
@ -7970,7 +7971,7 @@ function install_letsencrypt {
# This is experimental developer preview and I hope at some stage
# there will be a debian package for it.
# obtain the repo
if [ ! -d $INSTALL_DIR/letsencrypt ]; then
git clone https://github.com/letsencrypt/letsencrypt
@ -7988,9 +7989,9 @@ function install_letsencrypt {
./letsencrypt-auto --agree-dev-preview --server https://acme-v01.api.letsencrypt.org/directory certonly
if [ ! "$?" = "0" ]; then
echo 'Failed to install letsencrypt'
exit 63216
exit 63216
fi
echo 'install_letsencrypt' >> $COMPLETION_FILE
}