hello, thanks,
sorry for such a basic question, but could not find the answer in the docs and around the internet.
i did find https://forum.restic.net/t/prevent-restic-restore-to-override-local-storage/5476
i backup /home/username/dir
to restic.
the contents of /home/username/dir
becomes corrupted
— human erorr
— ransomware
— whatever
now i want /home/username/dir
to revert back in time to one of the snapshots.
hope i explained well, thanks
gurkan
December 7, 2022, 7:53pm
2
Hi,
Restore command needs a --target parameter, just find your snapshot from the “safe” time (via restic snapshots
) and use that snapshot id to restore into that place like restic restore $snapshotid --target /home/username
. Optionally wipe/move dir
to somewhere else before…
hi,
did a quick test, and not working, as the operation is a simple copy/overwrite.
i am looking for a sync/mirror from snapshot to source dir.
that way
— do not need extra free hard drive free space.
— quick and easy way to recover.
i guess i am looking for what veeam does, pick a snapshot and the source will be a mirror of the snapshot.
strange, restic cannot do this yet
or is there a way?
i have read that some are using rsync
, i guess i will have to learn that.
restic restore $snapshotid /tmp/snapshot
rsync /tmp/snapshot /path/to/source
Sorry for the advertisement of rustic , but it supports rustic restore --delete $snapshotid:/path/to/source /path/to/source
which should do what you want.
For restic, have a look at the following open issues:
opened 09:00PM - 22 Mar 20 UTC
type: feature enhancement
category: restore
state: need direction
Output of `restic version`
--------------------------
`restic 0.9.5 compiled… with go1.12.4 on windows/amd64`
What should restic do differently? Which functionality do you think we should add?
----------------------------------------------------------------------------------
I know that this isn't a synchronization software, but it would be veeeery nice to implement a `restore` function which restores only changed files in a directory and deletes files which are present in that directory but not in the snapshot i am restoring. To better clarify this, think of it like a sort of `git checkout`
What are you trying to do?
--------------------------
Suppose that I have a 500GB folder `localdata` on my pc and a dir named `myrepo` on an SFTP server, in which i backup `localdata`. I would like to work on `localdata` in an agile mode, making frequent changes to the directory internal structure, moving files, renaming, deleting some useless content, ... and so on. Every time i feel it is necessary, i execute `restic backup -v localdata -r sftp:user@host:myrepo`
Suddenly, a week later i wake up and i find out that some of my important files in `localdata` are gone, because i deleted them accidentally or maybe my sister deleted them because she doesn't know how to properly use a computer... I'd like to fully restore a previous version of the folder from `myrepo` without the need of redownloading the entire 500GB data from the server. That's what i usually do with `git checkout <old_commit_id>` except that i don't have 500GB git repos :sweat_smile:
Did restic help you today? Did it make you happy in any way?
------------------------------------------------------------
Yeah, this software solved me a lot of problems. I use it **daily** for my **main** backups. I also appreciate this wonderful idea of asking users some positive feedback here in issues.
Restic is awesome! Keep up the good work :wink:
opened 09:50PM - 22 Jul 19 UTC
category: restore
type: feature suggestion
Output of `restic version`
--------------------------
restic 0.9.4 compiled wi… th go1.11.4 on linux/amd64
What should restic do differently? Which functionality do you think we should add?
----------------------------------------------------------------------------------
Add a command line option to `restic restore`, say `--delete`, which causes restic to delete any local files not in the snapshot.
What are you trying to do?
--------------------------
I want to restore the directory (the whole of which has been backed up by restic) to a snapshot. Which ought to be able to delete anything which was added since the restic snapshot was created. (I am used to this kind of behaviour from snapshots in ZFS, for example.)
The particular case I am considering is a WordPress installation. I took a restic backup prior to installing some plugin, which I then realise is garbage, so I want to revert. Which should also mean, delete any new files which got installed. Say I have 100GB in my WordPress directory. It’s ridiculous that I have to delete everything, and let restic restore it all from the snapshot. Restic is already scanning the filesystem (to work out what to restore), so should be easy for it to say, hmm, a new file or whole subdirectory not in my snapshot, perhaps the user would like to delete it?
Did restic help you or made you happy in any way?
-------------------------------------------------
Yes, in general I am loving restic. Who'd have through there was space for innovation in this area? Good job!
1 Like