Browse Source

Forgetting period

Bob Mottram 10 years ago
parent
commit
3c3be40609
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      install-freedombone.sh

+ 4
- 0
install-freedombone.sh View File

@@ -229,6 +229,9 @@ MAX_PHP_MEMORY=32
229 229
 # default MariaDB password
230 230
 MARIADB_PASSWORD=
231 231
 
232
+# The obnam forgetting period
233
+BACKUP_PERIOD_DAYS=30
234
+
232 235
 # Whether to encrypt backups to the USB drive
233 236
 ENCRYPT_BACKUPS="yes"
234 237
 
@@ -3174,6 +3177,7 @@ function create_backup_script {
3174 3177
   fi
3175 3178
 
3176 3179
   echo '#!/bin/bash' > /usr/bin/$BACKUP_SCRIPT_NAME
3180
+  echo "obnam forget --keep=${BACKUP_PERIOD_DAYS}d" >> /usr/bin/$BACKUP_SCRIPT_NAME
3177 3181
   echo "if [ -b $USB_DRIVE ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME
3178 3182
   echo "  if [ ! -d $USB_MOUNT ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME
3179 3183
   echo "    mkdir $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME