Backup solution for UCS

Hello,

Can you give some advice about backup solution for UCS DC?
I have a working server but I need some kind of backup copy if it falls.
What are yours experiences with it? What solution you use?

Thanks in advance,
LK

I’m using Veeam Agent for Linux FREE, to create daily backups of the entire system partitions. It’s the easiest way, in my opinion.

How you have installed your UCS’s Servers? PHY or virtual. If virtual what solution?

It’s physically installed now.

But in future I can change it to virtual machine maybe - if there is some open source solution.

If would like to change to virtual machine, i can recommend Proxmox. Is open source and you can buy nice Support. With that solution you have fullvmbackups integreated.

So for now (databackup) you can use Bareos or BackupPC (very easy over SSH). It is possible to restore the whole machine with backuppc too (livedisk). But if would like real phy images you may would like an other solution, like clonezillaserver. So it is possible let Server boot over night to an automated pxesolution to make an image from the machine. We have done this with Clonezillaserver.

Whichever backup solution you decide to use, please make sure in advance that it supports ACLs and extended attributes. An easy check is to back up /bin/ping, restore it somewhere else and compare the output of getcap /bin/ping and getcap /path/to/restored/ping.

Why are they important? Because Samba stores Windows ACLs in extended attributes. And not only that, certain system utilities such as the aforementioned ping use extended attributes and won’t work properly anymore when they’re absent.

As far as I know,

  • borg supports both, no matter which file system the data is backed up to (borg is what I’m using everywhere these days),
  • Bareos supports both, too,
  • anything based on rsync will only support ACLs & extended attributes if the file system the data is backed up to supports both — NFS, for example, only supports ACLs with certain servers and never supports extended attributes (!!); even if the target file system supports them, you have to turn on support for both in rsync via the -A and -X parameters
  • anything using GNU tar is unlikely to support either as GNU tar hadn’t supported either for quite a long time

So if you’re unsure, do the test I wrote above!

2 Likes

How do you make backup and then restore using borg? Do you backup some specific folders and if there is a restore needed you do fresh UCS install and then restore those folders? Or is it more “automatic” process?

borg is a command-line program running on the machine you want to back up. Restoring certain files or folders looks much like extraction with tar would look, e.g.

cd /where/I/want/to/restore-stuff
borg extract ::nameOfBackup20191029 path/to/backed-up/folder

That would restore the data in the current working directory. No new UCS instance needed.

Only if there was a catastrophic failure (e.g. the whole server is irreparably broken) you’d start a new server from a Linux rescue CD, create file systems manually and run borg extract… with all of the directories.

I always backup pretty much the whole server with borg, not just certain directories. Restoring after a catastrophic failure would be much faster than having to re-install my whole domain due to not having backed up the whole system…

@Moritz_Bunkus borg still missing a frontend/webgui right?

Hello

It is still not clear for me how to use borg to backup DC and recover it for UCS. Should I backup entire disk image or only some folders (what folders are vital)?

I’m not up to date on that topic, but a quick search revealed this Reddit thread about borg UIs. There’s also borgweb.

Personally I only use borg via the command line or rather via some scripts I’ve whipped up that do both backing up & purging old images, hence me not being up to date on GUIs/web UIs.

No matter which backup program your choose, always back up everything[1]. For backup programs that work on the file level (instead of whole disk images) such as borg, backup up / and any other mounted partition such as /boot. When in doubt, consult /etc/fstab.

Desaster recovery is a multi-step process and depends on your system’s current setup. Here’s what it might look like:

  1. Create your new (virtual) server, add hardware such as disks etc.
  2. Boot your new (virtual) server from a rescue CD such as grml
  3. Partition your hard drives, create logical volumes, create file systems on your logical volumes (this part highly depends on your previous disk layout)
  4. Mount your new file systems on /mnt and beneath that (e.g. your new /boot partition as /mnt/boot)
  5. Download the latest borg binary from the GitHub project (this binary contains everything; you can run it directly from grml)
  6. Change directory to /mnt and run /path/to/borg extract <repositorySpecificationForRoot> and the same for the other backed-up directories
  7. Reinstall your bootloader, e.g. grml-chroot /mnt /bin/bash followed by grub-install /dev/sda and exit
  8. Reboot from hard disk

[1] There are directories which can be excluded from a backup without the risk of losing important data. These are all directories that can be considered caching directories as the host programs can recreate that data, e.g. /home/*/.cache, /var/cache/squid or /var/cache/apt/archives

2 Likes

How to install borg in UCS?
Download and install like in debians like dist or enable some kind of repo?

LK

Mastodon