I have periodic backups of my system, but no a full system backup. I’m researching how to do it and I would like to ask for some advice. I know there are plenty tolls to do a offline backup (dd, clonezilla, etc.) but I want to do it with the system online, and program it to do by night.
I have done something like this in the past with rsync with success, although I’m aware it’s potentially dangerous because you can have inconsistencies (for instance with databases).
I have seen some tools, like Deja Dup.
By now the tool I have liked the most is fsarchiver which using with LVM snapshots and rubackup can do what I want … I would need to change the system to LVM which it is not now though.
Any other ideas to explore or comments about these?
It is simple IMHO. The same problems that you mention with rsync (and many of the others use rsync under the hood) will be evident with all “live” backups. That is how it is.
And for databases there normally are special backup tools (dedicated to the database software) used. Another solution for large active collections of data is using a RAID construction. You can e.g. in a mirror stop the database, uncouple a mirror, start the database (that thus is only off-line for a short time), do the backup from the uncoupled mirror, rejoin the mirror and let it sync.
In the case of fsarchiver+rubackup I mentioned. The documentation says
If the partitions you want to save are LVM (Logical volume Manager) Logical-Volumes, and it you have free extents in the Volume-Group, then you can make a filesystem snapshot of these Logical-Volumes. A snapshot if a frozen copy of a Logical-Volume made at a given time. After that time, the original partition can still be modified normally, and the snapshot provides a consistent filesystem that can be backed up. To create an LVM snapshot, you have to use lvcreate with option --snapshot, and then the snapshot can be mounted read-only on a directory. By default, all the partitions except /boot are configured as Logical-Volumes with recent Redhat-Enterprise and Fedora distributions. You can have the list of all your Logical-Volumes with the command called lvdisplay. If this command is not installed on your system, you are probably not using LVM.
…
You can use rubackup to make fsarchiver backups, and it can automatically create an LVM Snapshot just before the backup, and it will delete just after the backup has been done.
So I understand It will make “a photo” of the system prior to back it up so it is totally safe.
I have seen a similar way to back up virtual machines in VMWare ESXi: make a snapshot, backup the snapshot, delete the snapshot.
Of all tools I have found it seems it can be the more reliable. You need to be using LVM… maybe there something similar with BTRFS.
I do full system backups and restorations. Saved me a year ago when my whole filesystem failed after one too many kernel panics.
To avoid inconsistencies as much as possible you should use btrfs snapshots (which are atomic) and take them during a quiet part of the night (3 AM for me).
I have a guide for LMDE but not yet for OpenSuse, though the concepts are the same.