From e5431bb2ce40f3572ad06cb259489b7ef26d4ca7 Mon Sep 17 00:00:00 2001 From: "Gaunt, John" Date: Mon, 7 Jan 2019 14:54:05 -0500 Subject: [PATCH] Update gauntmta_backup.sh --- gauntmta_backup.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gauntmta_backup.sh b/gauntmta_backup.sh index 689bb3d..814b058 100644 --- a/gauntmta_backup.sh +++ b/gauntmta_backup.sh @@ -11,13 +11,12 @@ crontab -l > /root/crontab.txt # create the backup tar -cpSzf "${TAR}" --exclude="${BACKUP_DIR}" --exclude=/var/cache --exclude=/var/mail ${DIRS_TO_BACKUP} -# sync the backup directory to seafile -rclone sync /backups/ seafile: - # 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 | grep -v '/$' | tail -n +15 | xargs -I {} rm -- {} +ls -tp "${BACKUP_DIR}" | grep -v '/$' | tail -n +15 | xargs -I {} rm -- {} +# sync the backup directory to seafile +rclone sync "${BACKUP_DIR}" seafile: :' # this is so ugly, need a better solution for what programs are installed/used and their configurations.