added restic backup and prune commands. the prune still needs work
This commit is contained in:
11
restic.sh
11
restic.sh
@@ -62,18 +62,11 @@ if [ "${LATEST_RESTIC_VERSION}" != "${INSTALLED_RESTIC_VERSION}" ] || [ ! -e '/u
|
||||
fi
|
||||
fi
|
||||
|
||||
# check if the /.duplicacy/preferences file exists before continuing
|
||||
if [ ! -e "/.duplicacy/preferences" ] || [ ! -e "/.duplicacy/filters" ]; then
|
||||
echo "ERROR: Duplicacy not yet configured. Please refer to readme file"
|
||||
exit
|
||||
fi
|
||||
|
||||
# run the backup
|
||||
cd /
|
||||
duplicacy -verbose -log backup -stats >> ${LOGFILE} 2>&1
|
||||
restic --cleanup-cache --verbose backup ${BACKUPS} >> ${LOGFILE} 2>&1
|
||||
|
||||
# prune the backup
|
||||
duplicacy -verbose -log prune -keep 0:360 -keep 30:180 -keep 7:30 -keep 1:7 >> ${LOGFILE} 2>&1
|
||||
restic --verbose forget --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --keep-yearly 75 --prune >> ${LOGFILE} 2>&1
|
||||
|
||||
# copy the backup to offsite but only if the backup id as passed in
|
||||
if [ "${1}" == "--copyOffsite" ] || [ "${1}" == "-c" ]; then
|
||||
|
||||
Reference in New Issue
Block a user