autorestic icon indicating copy to clipboard operation
autorestic copied to clipboard

After pack Hook / separate the packing and uploading process

Open FarisZR opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Currently, Autorestic After hooks run after uploads, which would cause issues for people with slow upload speeds, like home connections. For example, if I used hooks to put nextcloud in maintenance mode, it would stay in maintenance mode until the upload is finished, which cloud take days!.

An after upload hook would be helpful. It disables maintenance mode when restic has finished packing files, and is no longer sensitive to file changes.

Describe the solution you'd like

A hook that executes after the packing process is finished

alternatives I considered

Having a 2 step backup process, one to back up locally, and the other to back up the local files to remote storage. But there is no clear way to disable encryption and the creation of a repository file structure, so I don't have to clone a repo instead of raw files. And can I specify the order of how the backup runs? If not, this wouldn't work.

Overall an after packing hook with a way to specify where temporary packed files are going to be stored until they are uploaded would be a much better solution.

Or you can separate packing / uploading files into separate processes.

FarisZR avatar Mar 11 '22 21:03 FarisZR

Support for #145 copying repositories would allow for a 2-step backup process.

However, an after packing hook is still better, as you don't have to deal with extra local files and deleting manually.

FarisZR avatar Mar 13 '22 14:03 FarisZR