-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
- name the backup sub dir with suffix "NOT COMPLETED"
- remove the suffix after last file
generally:
- sort files to backup from resent modified time to oldest modified time (Idea: the newest files can't exist in any backups created in the past)
resume
- resume backup if last sub dir has the "NOT COMPLETED" suffix
- rename last dir with suffix to current timestamp
- look in database for OLDEST_FILE_TIMESTAMP
- read source files
- sort by timestamp (newest to oldest)
- split file list by OLDEST_FILE_TIMESTAMP -> OLD_FILES, NEW_FILES
- backup OLD_FILES first
- compare NEW_FILES only by filesize/mtime
- remove "NOT COMPLETED" suffix from backup sub dir
start new backup
- We can use the same resume strategy on every new backup run to save many times