Can I move Borg Backup Files?

Can I move Borg Backup Files?

Solved: Yes you can!

Yes, you could just copy all the files. Make sure you do that while no backup is running.

https://github.com/borgbackup/borg/blob/master/docs/internals.rst#config-file:

…It will not change if you move the repository around so you can make a local transfer then decide to move the repository to another (even remote) location at a later time.

Just starting out with Borg (I only ask because with Arq moving files around actually broke backups) but can move backed up files to other servers and then point Borg at the new location?
Use case: net at home is slow, can I borg backup to a location, put it on a USB Drive and upload it to a server from work and then edit my borg client settings to the server I uploaded it to? Then any changes can be uploaded from home as they are smaller. (or even skip the home server and backup to USB)

I asked on #borgbackup and got a response along with a few other responses not directed at me that are useful.

Moving:

I’ve made about 1000 borg backup repositories onsite, then copied them offsite, and now backing up to onsite and offsite repos
There are some caveats though
I use BORG_CACHE_DIR per repository so this is something to keep in mind if you’re planning on doing what I did
You will have warnings about moving the REPO
There are some cache sync things, so I’d advice to test with smaller set of files you “move” procedure first and then move the lot

Renaming:

Good point. On another note, is it possible to simply rename the backup repository? Say, move it from /backup1 to /backup2.
I guess the only thing needed is adjusting your backup “scripts” to point to the new directory, right?
almost
on first access via the new location you get a warning that it changed. that was introduced to prevent unnoticed tampering with the repo
Other than that?
not to my knowledge

Testing Backups:

I’m doing some backup/restore tests right now. What should I do to compare the restored data to the test data ? Right now I’m doing a diff -rq for the content but I’m not sure if it’s checking for the timestamps/permissions.
rsync -anP /root1/ /root2/
the important part is -n (no-action/dry-ruN)
Thank you nachtgeist. Should I run it both way since it’s rsync ?
good point. you could add –delete to see excess files in the second root, that way one-way is enough.
Awesome, thank you

Leave a Reply

Your email address will not be published. Required fields are marked *