create the host directory on first run
[rsync_backup.git] / rotate_snapshot_daily.sh
blob6d7a58560df97313dcb3c643e3f454ad9e369444
1 #!/bin/sh
3 . /etc/conf.d/backup
5 . $BINDIR/backup_lock.sh
7 # rotate old backups
8 ${REMOTE_RM} -rf ${DST}/daily.3
9 ${REMOTE_MV} ${DST}/daily.{2,3}
10 ${REMOTE_MV} ${DST}/daily.{1,2}
11 ${REMOTE_MV} ${DST}/daily.{0,1}
12 ${REMOTE_CP} -al ${DST}/hourly.4 ${DST}/daily.0
14 . $BINDIR/backup_unlock.sh