Best practice - one big dir or several smaller ones?

Long time IT guy here who is finally getting around to setting up a ‘real’ backup after I had a scare with my wife’s Windows box LOL. Locally I’m using FreeFileSync to basically sync one of her drives to a local USB drive plugged into my router over USB. Simple and good enough for her needs. Then I’m looking at using Restic to back that up to Backblaze.

I’ve got everything setup and working - before I pull the trigger I’m curious…

Given I have a dir structure like

parent\dir1
parent\dir2
parent\dir3

Is there any benefit of doing multiple dirs or just the parent?

restic -r ${RESTIC_REPOSITORY} backup dir1 dir2 dir3
restic -r ${RESTIC_REPOSITORY} backup parent

I can see in the restore docs I can use include/exclude flags so I’m leaning to just do the parent but wanted to check here first :slight_smile:

I would do just the parent, there’s no point in doing the individual dirs.

But I very much question why you would use FFS to sync data through a router with god knows how high quality firmware for its disk/file sharing, and then over a potentially shaky USB connection to a disk which by now is the third thing that can fail along this way, and then in order to back this up have to read the data back over this infrastructure, before sending it off using restic.

A much better solution if you ask me is to just put restic on her computer and back up straight from there to B2. If you still want the USB disk to have a copy as well, then either use restic to back up to that one too, or keep using FFS as a secondary backup (it’s never a bad idea to have multiple backup softwares).

1 Like

LOL Good points and I honestly didn’t know Restic ran on Windows - I saw the cli and assumed it was Linux/Mac only. Will give it a try!

2 Likes

That’s great! Yeah, and restic has support for Windows VSS nowadays too, see: Backing up — restic 0.11.0 documentation

You can run and schedule it yourself, or use something like GitHub - kmwoley/restic-windows-backup: Powershell scripts to run Restic backups on Windows (which I use) . There may be other and better wrappers too, I’m not sure (hopefully someone else can tell you how they run restic on Windows).

1 Like

If you use excludes to match the same contents, then actually the directories contained in the backups are equal. The only difference is, what backup paths you see in the snapshots.

If you are satisfied with seeing parent in the snapshot list, I would also recommend to just use that.

If you want to document in the snapshots that you have backup’ed dir1, dir2, dir3 you should give them as backup dirs separately. But be aware that if you change the dirs - e.g. add a dir4 - restic is not yet able to speed up the first backup after the changed dirs by using a previous backup without that dir.

Another use case would be to specify different backup intervals or retention policy for the different directories. But in this case you would anyway have individual backup runs to create individual snapshots for each dir, e.g. restic -r ${RESTIC_REPOSITORY} backup dir1 and then restic -r ${RESTIC_REPOSITORY} backup dir2

My own style would be to back up parent. If separate backups of each dir are done then when another dir is created the backup script has to be changed but if the parent is backed up a new dir will automatically be backed up. Also if the dir is renamed the backup of parent will automatically find the new name but separate dir backups would fail.
When running on Windows be sure to tell your antivirus checker to ignore the restic.exe otherwise things will be slower.
I’ve run restic on Windows for over a year without problems.

2 Likes