Restoring snapshots in remote target

First of all thank you for creating this tool. I’m really liking it so far. I did run into an issue or this is more of a question rather.
Before that, let me explain why I’m doing what I’m doing.
Recently, I had my hard-disk(non-backup) crash so I had to restore from my backup. And since this machine only had 2GB of RAM it kept throwing OOM (out of memory) error. So I figured I could just take the backup disk and restore it from my more powerful machine. Only problem is I didn’t have the right adapter to connect my RAID disk to this new powerful machine which meant I didn’t have enough hard-disk space in my powerful machine to initiate restore process in that machine. So, I figured I could restore it directly through scp/sftp on --target but that doesn’t appear to be exactly doing what I had hoped.

This is what I’ve tried so far.

restic -r /path/of/backup restore <snapshot_id> --target 'sftp:user@host:/restore/target/path'

But that keeps creating a new directory in my $HOME instead. Maybe I’m missing something or just wondering if this feature is even supported yet.

Hey @shri3k and welcome to the restic community! :slight_smile:
AFAIK you can’t specify your target like this. So from what I understand is that you want to “push” the data from the repository to your computer where the data originally was backed up from.
One thing that I could think of is that you could enable a share on your computer and mount that share on the more powerful computer. That way you could write into that share using the --target argument.

OR you could use restic mount on the beefier machine and then rsync the files you want to your slower computer. (I’d use rsync instead of scp… scp is horrible and people really shouldn’t be using it anymore. More info here: Deprecating scp [])

1 Like

Ah ha. I never thought of sharing drives. That’s so brilliantly simple solution!! And restic mount isn’t a bad idea either. :grinning_face_with_smiling_eyes:
Thank you so much for helping.

Sure thing! Let us know if this worked out for you in the end or if you have more questions :slight_smile: