764287
April 5, 2021, 2:03pm
2
In this post I tried to explain how resuming of interrupted backups currently works in restic:
Well, kind of
For every backup run, restic basically does 2 things:
Scan for all the files which need to be included for this backup
Chunk the files and save them to the repository
The first part has to be run always as restic needs to have accurate information (files might have changed since last backup run) of all the files that you want to backup. This step might take some time if there is no ‘parent’ snapshot. A ‘parent’ snapshot is a previous snapshot of same ‘type’ (usually sam…
A subsequent post in this thread recommends splitting the initial backup into smaller parts which might help in your case aswell.
@alexweiss made a PR to improve resumption of interrupted backups. Note that this PR hasn’t been merged yet and might have bugs, but you could give it a shot.
restic:master
← aawsome:backup-resume
opened 01:10PM - 16 Jan 21 UTC
What does this PR change? What problem does it solve?
-------------------------… ----------------------------
This is a follow-up of #3229.
In this PR I made a PoC using the idea of user odin from the forum, see link below.
With this PR, restic writes a temporary file (in the cache dir to the selected repo, subdir /resume/) which contains the list of already finished directories and the tree ID where it is saved in the repo.
If the backup suceeds, the file is removed.
At the start of a backup, restic tries to read the temporary file (if existing) and uses the contained trees as "additional parent trees" for the given directories. This means that w.r.t. already saved trees, this resumed backup is as fast as a follow-up backup using a parent snapshot.
Note that this PR relies on #3121 which should be merged first.
Was the change discussed in an issue or in the forum before?
------------------------------------------------------------
closes #2280
alternative to #2960
https://forum.restic.net/t/quicker-interrupted-backup-resumption/3470/6
Checklist
---------
- [x] I have read the [Contribution Guidelines](https://github.com/restic/restic/blob/master/CONTRIBUTING.md#providing-patches)
- [x] I have enabled [maintainer edits for this PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
- [ ] I have added tests for all changes in this PR
- I have not added documentation for the changes (in the manual) - there is also none for parent snapshots
- [x] There's a new file in `changelog/unreleased/` that describes the changes for our users (template [here](https://github.com/restic/restic/blob/master/changelog/TEMPLATE))
- [x] I have run `gofmt` on the code in all commits
- [x] All commit messages are formatted in the same style as [the other commits in the repo](https://github.com/restic/restic/blob/master/CONTRIBUTING.md#git-commits)
- [x] I'm done, this Pull Request is ready for review