diff options
-rwxr-xr-x | profiles/backup-archive | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/profiles/backup-archive b/profiles/backup-archive index 623c7e1..7d7a81a 100755 --- a/profiles/backup-archive +++ b/profiles/backup-archive @@ -1,10 +1,14 @@ #!/bin/sh +################################################## +# Keep a montly copy on the first day of the month +# This should run after the backup-sync profile +################################################## + DATE=$(date -u "+%Y%m%d%H%M%S") SRC="$(hostname).apkovl.tar.gz${SUFFIX}" DEST="$(hostname).${DATE}.tar.gz${SUFFIX}" -# Keep a montly copy on the first day of the month if [ "$(date +%d)" = "01" ]; then echo "Archiving montly backup" ssh "$BACKUP_SERVER" install -Dm644 "$FQDN"/week/"$SRC" "$FQDN"/month/"$DEST" |