Exclude by name?

I was wondering if someone tell me if its possible to exclude files by name?
ex: I have a folder named users inside that folder i would only want to backup 2 of the 3 files inside as there really big files. one is name data.sldprt the other named zeus.sldprt those and the 3rd one which is name apolo.sldprt i dont want to backup apolo.sldprt just the data and zeus files is there a way i can exclude apolo.sldprt? I was reading the documentation and i was guessing maybe something like this?

restic -r /path/tomyresticsnapshots --exclude-file apolo.sldprt

Thank you

You can use --exclude to to not backup the specified file or path. Use --exclude-file to specify a file which contains one or more patterns to be excluded.

In your case it would suffice to use --exclude /path/to/file/apolo.sldprt.

1 Like

Thanks for the reply, that did the trick and what if i would need to exclude another file within that command? would it be something like this?

  restic -r /path/tomyresticsnapshots backup --exclude apolo.sldprt zeus.sldprt /path/ofthedatafiles

Thank you

figured it out i had to add the extra --exclude

   restic -r /path/tomyresticsnapshots backup --exclude apolo.sldprt --exclude zeus.sldprt /path/ofthedatafiles

I’ve slightly corrected your post, you still had --exclude-file in the command line where --exclude was needed.

1 Like