Closed lukeeexd closed 5 years ago
You either run borg mount
or borg extract
on the same host as where you ran borg create
.
mount is more comfortable if you don't exactly know where the files are which you are searching and if you only need a low volume of files. it does not support some metadata like e.g. ACLs.
extract is better for full or high-volume restores as it is faster. also, it cares for a lot of metadata like ACLs, xattrs, etc.
So its literally the same as borg create
with the same options after it? so like
borg extract --progress --stats luke@DESTINATION_IP:/home/luke/borg::test-backup /Path/to/put/backup/on/destination/machine
?
You can see the archived paths when using borg list
on the archive.
You'll notice that borg removed all leading slashes.
borg extract does not support giving a destination directory, but always extracts to the current directory.
If you give a path to borg extract, it is a matching expression (if you do not want to extract all), not a destination directory.
BTW, the docs are linked from https://borgbackup.org/ - you can check all the details there.
BTW, for desktop users who prefer a GUI and want to save their home directory, there is also vorta:
Ah, so i need to extract to a directory then my best bet would be rsync back across?
The restore destination should be an empty directory. borg does not support transforming a non-empty dir to the state as present in your backup archive.
What you do afterwards (rename it into place or rsync) is your choice.
Maybe we should have a section about recovery with the essentials (similar to the quick install section with the backup script).
Yeah, all good got it all figured out. Thanks for the help and quick replies
I also feel little bit annoyed about the need to create subdir for borg in $HOME
because init
wants empty dir. Maybe it could ignore hidden files like .ssh
dir?
borg init
does not want an empty dir, it usually creates the repo directory by itself.
But if you give an empty directory, it accepts the given directory (not a non-empty one though).
borg init
does not want an empty dir, it usually creates the repo directory by itself.But if you give an empty directory, it accepts the given directory (not a non-empty one though).
Exactly, let's say BORG_REPO=ssh://${clientname}@example.com which would be ${clientname}'s home dir and probably having .ssh subdir. Yes, I can manage SSH keys in different way (LDAP, AuthorizedKeysCommand...).
It's a bad idea to put a borg repo directly into a home dir without using a subdir.
Just use $HOME/borg_repo
or a even better name, that is much cleaner and just works.
@lukeeexd please review #4723 - is that clear enough? Something important missing?
@lukeeexd please review #4723 - is that clear enough? Something important missing?
Uhh yeah sure haha, not really sure what I'm looking at
Not sure what you mean. The link to #4723 is a pull request (a proposed change for borg).
The top comment there has also a link to normally displayed docs.
Hey, cant for the life of me find anything on this.
So I recently(today) started playing with borg. Got it working to backup over ssh to another server. How would I go about restoring said backups back to the server it originated from?