What you should back up depends on how you use your PC. A regular backup of your home directories is usually sufficient. This protects against data loss, for example if an important file is accidentally deleted. With a suitable tool, you can automate the process.
If you have many programs and possibly server services installed, it is recommended to perform a complete backup of your hard disk from time to time. We present tools with which you can create a disk image and, if necessary, also restore it to a new hard drive.
Duplicates: Data backup (even over the network)
Duplicates It is suitable for regular backups of personal files. The tool supports backups to local drives, via FTP and SFTP, as well as Google Drive, Dropbox, Microsoft OneDrive, and some others. Continuous backups are incremental. Duplicates then only saves the changes from the previous backup.
TO duplicate.com/download, Ubuntu or Linux Mint users will find a DEB package that can be installed via the distribution’s package manager. In the terminal, use this command line in the download directory:
Change the file name for newer versions.
If you launch Duplicati from the desktop, it runs with user rights. A scheduled backup runs only if you are logged in and have started Duplicati. The web interface is accessed in the browser via http://localhost:8200.
For backups of folders that the standard user is not authorized to access, Duplicati must be started as a system service. Scheduled backups then run automatically in the background. Activate and start the service in the terminal with these two commands (Ubuntu/Linux Mint):
Configure backups: Duplicati automatically assigns the web server port. The first instance that Linux is started as a system service is assigned port 8200. If Duplicati is also started manually, the interface is accessible via port 8300. If the system service is not configured, the http URL also applies: //localhost:8200 Here . By clicking on Add backupyou define a backup task with the help of a wizard.
Restore backup: After clicking on Restore, select the desired backup and then the items in the file system. Files can be restored to their original location or copied to another directory. If you are recovering after a fresh installation of Linux, select the option Direct restore from backup files.
Tip: To back up your home directory, for example to a USB hard drive, just use the following command line:
“[drive ID]” is the designation of a hard disk that Linux has mounted under “/media/$USER”. Change the path according to your system configuration.
Further reading: Getting Started with Linux: A Beginner’s Guide
Timeshift: incremental system backup
Time shift creates snapshots of the file system. During recovery, you can restore the previous state. A second hard drive should be used as the destination drive so that the backup is preserved in the event of system hard drive failure.
Timeshift is pre-installed in Linux Mint; Ubuntu users use these three commands in the terminal:
After the first launch, select the option rsync AS type of snapshot and specify the destination drive and a schedule. Home directories are excluded from Timeshift by default because otherwise your personal data will be overwritten during a restore. It’s best to back up your files with Duplicati. Files and folders can be copied from Timeshift backup by clicking Navigate in the file manager. Restore restore your system to the selected restore point.
Aptik: backup before new installations
If you have a lot of software installed, you can reduce the effort after a fresh Linux installation or when setting up a second computer. With a list of installed packages and a backup of used repositories, you can quickly restore the previous state. If available, snap and flatpack packages should not be forgotten. Other candidates for backup include fonts, desktop themes, icons, and self-created entries in the “/etc/fstab” file.
aptik can be used to back up all of the above and more. However, it is available for a fee ($25). You can download an older free version for the command line from https://github.com/teejee2008/aptik. But it is not guaranteed to work properly with current distributions.
Tip: If a list of manually installed packages is sufficient, you can use this command line in the terminal (Ubuntu/Linux Mint):
After the new installation, this command is sufficient:
This restores the packages from the previously saved list.
Rescuezilla: Hard Drive Backup
A 1:1 copy of the contents of your hard drive is the most secure backup method. However, the process takes a long time for well-filled drives, and changes that occur between backups must be backed up separately. However, for PCs that serve as file servers and on which minor changes are made, other than updates, an image copy of the hard drive may be useful.
Rescuezilla Create image backups of partitions and entire drives. The backup can be saved to a USB hard drive or a network drive. You can burn a DVD from the downloaded ISO file or create a bootable USB stick, for example with Etching.
After clicking on Save, enter the source drive, partitions, and destination drive. Under Compression methodTo select Uncompressed. You can then extract individual files or folders from the image using Image Explorer offered by Rescuezilla. After clicking on Restorethe saved image can be copied back to a hard disk.
Use Rescuezilla Clonezilla on background. Professionals can launch Clonezilla directly in the terminal and use the additional options of this program.
This article was translated from German into English and originally appeared on pcwelt.de.