Ubuntu data backup and recovery tools (2)

The previous article talked about how Deja Dup backs up files and data in the directory , so our article will talk about the complete backup and recovery of the Linux system. The protagonist is of course Time Shift. The Ubuntu system is pre-installed with Time Shift, and we can also install it in some systems through the command line:

sudo apt install timeshift

After installation, we can choose from the menu or command line to run TimeShift.

insert image description here
Because TimeShift is too powerful, you need to have administrator privileges when running, and you must enter the administrator password.
insert image description here
We can choose RSYNC and BTRFS two backup methods, here we use RSYNC to test. But before continuing to the next step, we still have to briefly talk about the concepts of RSYNC and BTRFS.

RSYNC is a file synchronization transfer protocol, usually used to synchronize files between two different systems. In TimeShift, the RSYNC snapshot type is the increment between the two backup time points before and after creation, and the latter backup only adds files that were not in the previous backup. That is to say, the disk space occupied by RSYNC snapshots is much smaller than that of full backups, and the backup time is very short.
Btrfs is a copy-on-write (copy-on-write) file system, which has more advanced features in snapshot, compression, and array operations. In TimeShift, the Btrfs snapshot type can create a read-only type of system snapshot, which is used to restore the system data at a specific point in time. It is faster and less time-consuming than RSYNC. Of course, the disk space consumed by the two types of snapshots is very small. After all They only care about deltas between different points in time. However, it should be noted that Btrfs only supports the operating system of the Btrfs file system.

Next, let’s go ahead and choose the storage location of the snapshot first, which can be a hard disk different from the system or in the same hard disk.

insert image description here
Then choose the frequency of the backup, or the time interval of the backup plan.
insert image description here
For example, Daily keep 5 means that it is backed up once a day, but only the last 5 incremental snapshots are kept.
Next, determine how to back up the files in the Home directory, exclude all files and clear the files added in these directories during recovery, include hidden files and back up all hidden files, and so on.
insert image description here
This completes the configuration wizard. Then create a snapshot and restore the snapshot. First, select Create for snapshot processing, and TimeShift will automatically perform incremental backups automatically according to the backup location and scheduled frequency set in the wizard above. After each snapshot is completed, we can also comment on it, and manage multiple snapshots, such as deletion.
insert image description here
Finally, of course, it is time to resume work. Select the snapshot to be restored, and then select Restore. TimeShift will also automatically restore the data, and also require the administrator password to be entered.

Guess you like

Origin blog.csdn.net/weixin_37885187/article/details/129290612