Ver código fonte

Forgetting period

Bob Mottram 10 anos atrás
pai
commit
3c3be40609
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4
    0
      install-freedombone.sh

+ 4
- 0
install-freedombone.sh Ver arquivo

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