The "inprogress" mark is set after purging old backups.
Problem: When deleting old backups takes long (many backups to purge, slow fs because remote mount, ...), a new backup can start successfully while the 1st is still purging backups.
suggestion: create "inprogress" just after checking if it exists.
This may have side effect on trying to resume an aborted backup. to improve this, the backup could get a temporary name ("_" preppended?) and be renamed to the final name when finished.
note: also order related: defining link dest before purging backups #162
side note: DEST="$DEST_FOLDER/$NOW" is already done before purging, so the stamp in the folder name may have almost noting to do with the time of its content.
The "inprogress" mark is set after purging old backups. Problem: When deleting old backups takes long (many backups to purge, slow fs because remote mount, ...), a new backup can start successfully while the 1st is still purging backups.
suggestion: create "inprogress" just after checking if it exists. This may have side effect on trying to resume an aborted backup. to improve this, the backup could get a temporary name ("_" preppended?) and be renamed to the final name when finished.
see in code:
note: also order related: defining link dest before purging backups #162 side note: DEST="$DEST_FOLDER/$NOW" is already done before purging, so the stamp in the folder name may have almost noting to do with the time of its content.