Guys hi,
Long time (and happy) restic user.
My main back up command is something like this:
restic -r $REPO backup k:/sync --exclude logs
there is one folder in which i want to exclude all files except one, so i was thinking to add to my command --exclude-file .rignore, and placing in it
/k/sync/Mems/AAA/**
!/k/sync/Mems/AAA/url-watches.json
but apparently i can’t do cause “It works similarly to gitignore, with the same limitation: once a directory is excluded, it is not possible to include files inside the directory.”
So i will have to do
/k/sync/Mems/**
!/k/sync/Mems/AAA/
/k/sync/Mems/AAA/
!/k/sync/Mems/AAA/url-watches.json
problem that Mems folder has lots of folders so i will have to do something like
/k/sync/Mems/**
!/k/sync/Mems/AAA/
/k/sync/Mems/AAA/
!/k/sync/Mems/AAA/url-watches.json
!/k/sync/Mems/BBB/
!/k/sync/Mems/CCC/
…
!/k/sync/Mems/ZZZ/
which is obviously very dirty / unconvenient.
Do i understand i right best solution here is to exclude full fulder with --exclude AAA and than run separate backup command only for the file i need?