Restoring one directory from backup restores everything


I started to use restic just few days ago. I am running Arch Linux and installed restic from the official Arch repository.

I created a full backup of one partition and I wanted to do a partial restore of the backup into another partition. I came into two issues:

  1. Using “latest” while providing a path reported: latest snapshot for criteria not found: no snapshot found Paths:[/data/yang/] Host:
    But the path exist as I see it when I mount the snapshot and doing a full restore restores it.
    Here is how I executed restore:
restic -r /media/autoshares/restic/mydata restore latest --target / --path /data/yang/
  1. The other issue is that when I provided a specific snapshot id and a path, restic started a full restore instead of restoring only the path which was provided.
    Here is how I executed restore:
restic -r /media/autoshares/restic/mydata restore 8530cb2a --target / --path /data/yang

I am not sure if I am doing something wrong or if there is a bug involved.

restic version is reported as:

restic 0.9.6 compiled with go1.13.4 on linux/amd64

Hello, and welcome to the forum! I think there’s a misunderstanding: the option --path for the restore command is just used to find a snapshot to restore, it does not limit what is being restored. In order to include or exclude paths from the restore, please use --exclude or --include. In your case, I think this could work:

$ restic -r /media/autoshares/restic/mydata restore 8530cb2a --target / --include /data/yang

Please be aware that if you specify absolute paths using --include, they need to match what’s in the snapshot. You can check using restic ls <snapshotID>.


Thanks a lot. I had a feeling I was doing something wrong. I tried with --include and it worked. :slight_smile: