Update gauntmta_backup.sh
This commit is contained in:
@@ -13,7 +13,8 @@ tar -cpSzf "${TAR}" --exclude="${BACKUP_DIR}" --exclude=/var/cache --exclude=/va
|
||||
|
||||
# only keep 14 copies on local disk, seafile will keep deleted history
|
||||
# https://stackoverflow.com/questions/25785/delete-all-but-the-most-recent-x-files-in-bash
|
||||
ls -tp "${BACKUP_DIR}" | grep -v '/$' | tail -n +15 | xargs -I {} rm -- {}
|
||||
cd "${BACKUP_DIR}"
|
||||
ls -tp | grep -v '/$' | tail -n +15 | xargs -I {} rm -- {}
|
||||
|
||||
# sync the backup directory to seafile
|
||||
rclone sync "${BACKUP_DIR}" seafile:
|
||||
|
||||
Reference in New Issue
Block a user