-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Copying snapshots between repositories #465
Comments
Hey, thanks for the FR. This is something I've seen a number of people surface as a want -- and I think it's reasonable. So far I've been hesitant though, primarily due to this warning in the restic docs: https://restic.readthedocs.io/en/latest/045_working_with_repos.html#copying-snapshots-between-repositories . There are some significant footguns here. It may still be reasonable to try supporting with a warning. I think the way to go about it would be through the hook subsystem e.g. as a "CONDITION_SNAPSHOT_SUCCESS" hook that runs a Edit: another piece of complexity i'm seeing is that the Definitely open to ideas if there's a low cost way to implement this. |
As a workaround, for now I am testing the use of repository Using the hook ensures that while the clone is running, it won't do other actions. Though I would prefer to have some other way to trigger this, so at the end of it I could also trigger the Discord hook and notify of the status. Here is my configI have custom FROM garethgeorge/backrest:latest-alpine
RUN apk --no-cache add docker docker-compose rclone
RUN mkdir -p /root/.config/rclone/
COPY rclone.conf /root/.config/rclone/ The [backup-server]
type = sftp
host = 10.10.10.10
user = backup
key_file = /root/privkey
disable_hashcheck = true And then in The hook command is basically rclone sync /backups/restic-repo/ backup-server:backups/restic-repo |
+1, I think using rclone or rsync type tools in a hook is a good way to do this, it's safe to rely on the fact that hooks block any other operation from running on the repo. |
I think the downside is that if rclone fails, you have a broken mirror. This could be handled by mirroring to a different folder and then swapping them, but that requires double disk space and existing files would always be uploaded. I will try using the hooks and do the My big wish is still that backrest would allow selecting multiple restic repos for the same backup plan, without manually having to copy over json configs. 🙏 |
The question in my mind with supporting multiple repos in the UI is what the expectations around hooks and scheduling should be. It introduces something of a cross product e.g. plans cross repos in terms of the number of scheduled tasks. It potentially introduces some footguns as well re: how repo hooks and plan hooks might interact across those combinations that need thinking through. I wonder if some other concept e.g. a path template or similar is the way to go such that large pieces of configuration can be kept in sync between multiple plans? I.e. flags or excludes, etc. |
+1 for some way to do this. |
I'd like to get this working with command hooks as you suggested, however I'm stuck trying to locate the restic binary to run the command. I tried "restic" and "$BACKREST_RESTIC_COMMAND" This is my untested first attempt: It looks like restic is maybe in a version specific directory? |
In the latest version of backrest, the binary is now consistently named in |
I would like to submit a feature request that I believe could greatly enhance the usability and reliability of your system. Specifically, I would like to request the addition of support for copying between repositories, which would enable users to create remote backups and synchronize repositories as if performing a scheduled backup.
Key Benefits:
Suggested Implementation:
Integrate a scheduling feature so that synchronization can occur automatically at predefined intervals, similar to a regular backup.
The text was updated successfully, but these errors were encountered: