blob: 7d7a81ad2f88819c7d0f399447d3f7695e937786 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/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}"
if [ "$(date +%d)" = "01" ]; then
echo "Archiving montly backup"
ssh "$BACKUP_SERVER" install -Dm644 "$FQDN"/week/"$SRC" "$FQDN"/month/"$DEST"
fi
|