10

I've currently got a Fedora 21 system that's set up exactly the way I like it. I've had to mess with SELinux a fair bit, and its a pain to get all that redone, so my usual method of cp and reinstall will not quite work.

I'd like to be able to back up my system essentially the same way I back up my Windows systems - I use Veem Endpoint Backup there, but no Linux port is planned.

Essentials:

  • Automatic backups on a schedule (Say every day at night or at noon)
  • Options for bare metal recovery (So I can fire up a purpose-built liveUSB, point it at my backups and whoot)
  • Image-based, or at least maintains SELinux flags and other file attributes (I have a handful of Samba shares I spent entirely too much time setting up).

  • doesn't insist on its own volume for backups (as rear does by default)

  • runs on my regular install of Fedora 21, and has a maintained release for it.

  • is only around as big as the space I have used.

Nice to have:

  • a GUI
  • incremental backups with automatic pruning of old backups
  • Is a package available on standard Fedora or RPM Fusion repos
  • I'm able to directly set a SMB share from the UI/command line and it handles mounting it (though I guess I can just permanently mount my backup dir)
  • Able to exclude specific directories

Would be sweet

  • uses an image file and additional files, and does fancy things with AUFS so I can pick which snapshot I want through a file browser.

Essentially the ideal workflow would be to have a recovery disk of some flavour, a main image of my system, and incremental backups that get pruned at a user-defined point of time.

I don't want a live CD. I want something that's essentially at least the same as every Windows disk image program, only running on Linux. I'm also not really looking for a pure file-level backup.

What I've actually tried?

mondo/mindi: Dosen't recognise my btrfs filesystem, segfaults.

3
  • Why wouldn't pointing dd at your Linux partition be enough? EDIT: see this question.
    – oldmud0
    Jan 18, 2015 at 22:20
  • Not super fond of that option. Its probably alright as a baseline, and I suppose a sparse file capable dd flavour meets my minimum needs, but its not quite what I'm thinking of Jan 18, 2015 at 23:50
  • 2
    Don't use dd for live backups, unless you run your FS on LVM, so you can sync and then snapshot. Still a really bad solution, as you'll waste space backing up non-zeroed freespace. And you can't easily do incremental backups that way. Jan 19, 2015 at 14:02

3 Answers 3

3

SELinux uses extended attributes, right?

So I think you're right that cp -a / /backup wouldn't work.

nice ionice -c3 rsync --dry-run --one-file-system -aAHX --stats -h /src /dest/

should copy everything you need. (Trailing / or not on the src matters, so make sure your files are going where you want, after starting a copy).

So this should do the trick if you want to do a one-off copy. It's not a full backup solution, but if you want to homebrew something around it, you could.

3
  • Yup. I considered this and dirvish. My backup destination would need to be a linux filesystem in this case, and that makes me lose out on a little flexibility. Jan 19, 2015 at 23:16
  • update: if you're actually using SELinux, then read fsarchiver.org/Attributes carefully. I don't use SELinux myself, so hopefully I'm not mangling this, but it's recommended to back up SELinux systems while NOT running SELinux, because essential attributes are silently hidden, rather than "permission denied", depending on your security context. Feb 9, 2015 at 0:15
  • Yeah, I am actually using SELinux. Some days I'm tempted to turn it off, but that's a whole noter rant ;p Feb 9, 2015 at 0:19
2

I've not tried this myself, but yesterday stumbled upon Systemback, which claims to do exactly that:

Systemback makes it easy to create backups of system and users configuration files. In case of problems you can easily restore the previous state of the system. There are extra features like system copying, system installation and Live system creation.

(emphasis mine)

A (currently "partly paywalled") German article on LinuxUser describes this software as "clones the entire running Linux system on the push of a button", and says this is especially useful for switching to a new computer. I know you're on Fedora, so the following might be no "perfect match" – but here's even a Youtube video showing how to "Create System Restore Point In Linux Mint 17".

Not having taken a look at it myself, I cannot vouch for it or offer any personal experience. But from between the lines, it seems to do an "image backup", seems to be suitable to create a "live medium", should be a good choice for your "bare metal" recovery, and more.

For a closer look, there's an English article describing how the entire thing works. From the screenshots, I can even confirm some of your "nice-to-haves": It comes with a GUI, supports multiple "restore points" (not sure if that's done incrementally, though – it rather sounds like "snapshots" as you might know them from virtual machines):

[Systemback][6]
Screenshot of Systemback (source: Linoxide; click image for larger variant)

And though I never used it myself, I'm pretty sure that should fit your needs. For more screenshots, head over to the project's pages on Sourceforge.

The only thing which makes me suspicious is: All articles I've found so far refer to Debian or derivates (Ubuntu, Mint) – no references to any RPM based system. So I'm not sure whether it can be applied on Fedora.

Further references:

As I'm unsure whether Systemback will run on Fedora, let me name a few alternatives:

4
  • This might end up being an answer to another question if it generates a livecd of a current install of ubuntu. I can't seem to find any reference to a fedora port Jan 20, 2015 at 16:09
  • Neither could I; to be honest, in the end I even googled for "any rpm reference" and didn't find a single one. Maybe the dev is willing to provide it, the project is pretty young. // And yes, it can create a live system (as far as I've read).
    – Izzy
    Jan 20, 2015 at 16:11
  • SystemBack's sf page has a tar.xz download, that should be fine for non-dpkg systems. It's not the end of the world if nobody's packaged some software for your distro of choice, that's what /usr/local is for. Feb 9, 2015 at 0:18
  • I tend to disagree there. I'm usually not averse to building my own software but in this case, proper maintainance means more eyes on the software and someone making sure it works. Backups are important Feb 9, 2015 at 0:37
0

fsarchiver looks pretty nice. I'm not sure how much incremental-backup support it has, as it looks like it aims to be more of a dumpfs / restorefs. It can do mulithreaded compression; it maps 1-9 to a choice of lzo/gzip/bzip2/lzma with different settings. I think it only compresses file-at-a-time, to be more resilient to corruption, though. (It uses 32bit checksums on every block, and 128bit md5 on every whole file.)

I'm using it to archive my old laptop SSD before doing a destructive firmware update. Works fine so far, will update if the restore process isn't as easy as the dump.

When run, it mounts the block device to /tmp/fsa/. There's another way to run it, for dumping a directory tree, which I guess just works out of the live directory tree. Probably just skips the mount/unmount steps at the start/end. In that mode, it would be like a fancy version of tar or 7-zip, with parallel compression support, and careful archiving of all ACL/xattr/whatevers.

It has no problem dumping a rw-mounted FS, as long as you don't have a problem with the dump of different directories happening at different times. (the docs explain some of the potential pitfalls.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.