Oooo kaaaaay. Let's try another #linux question. So far though, either you guys aren't very helpful or I'm not asking the right way.

It's probably me right?

Best way to backup a Linux workstation? The ability to re-install and then shoot the backed up file structure back in place is what I'm looking for.

@thewismit btrfs is absolutely the best if your willing to use it. nothing comes close. but bear in mind its a fs. I use it wit btrbk to do the backing up. It kicks off every hour and keeps hour incremented backups with very little space per backup.

@thewismit I did.. the problem with any normal solution is their slow and prone to issues you cant solve without something at the FS level... I will say though if you dont wish to go with BTRFS then snapper is kinda the most common and best option you have in terms of kicking off the backup

@freemo I was just curious about your thoughts on snapper. I use restic backup in my Ubuntu server and I may do the same for the workstations.

The thing I don't see explained about btrbk is the restore mechanism. They state that there is no restore and I then go on to explain how to mv corrupted data and replace it with a snapshot. However, they don't explain how that snapshot calculates and restores the full data set including the specific snapshot delta.

Does that make sense?

@thewismit The filesystem itself actually handles all the heavy lifting. btrbk is a very very small script that does little more than call a handful of commands. Frankly you dont really need it at all considering that btrfs already has all the backup functionality built into it.

The only thing btrbk is handling for you is that it deletes old backups according to a roll-over schedule. The process of making the backups, or restoring them, is all handled by the filesystem.

Remember btrfs has backups and restores built in as a first class citizen of the filesystem, so if you want to lookup how to do something in that realm search for the filesystem itself.

But to cut to the chase.. if you have a snapshot somewhere and want to restore it, its literally one command (which comes with the file utils for btrfs):

btrfs subvol snapshot /mnt/${snapshot} /mnt/Butters/ROOT

That would restore a snapshot to ROOT location, notice your using the btrfs command directly.

@freemo and this restore happens in memory while the machine is booted? No offline restore?

I'm only just getting familiar with copy on write fs. I started with zfs on my Ubuntu server but I haven't had time to dig in yet :(

Also, can btrfs map around bad sectors like zfs can do?

Thank you for all this info!

@thewismit If its your root FS best to do it off a boot medium.

yes BTRFS will detect and compensate for bad sectors, most FS can and will.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.