Trading Up To Linux – Part 8 By Alan German Now that we have Linux installed, updated, customized, and running smoothly, it’s time to think about backup procedures so that we can easily recover our system and, in particular, our personal data files should any problems arise. My backup strategy is a three-part process. I make regular full-disk image backups, usually on a monthly basis, that allow the entire system to be restored in the event of a catastrophic disk failure. This also provides the ability to restore an individual partition, such as that holding the Linux operating system, without affecting other areas of the drive. A second process automatically creates incremental backups of my dedicated data partition each time the Linux system is booted, and retains multiple backups over an extended time period. Finally, I take a manual snapshot of the data partition after every working session so as to ensure that fully up-to-date copies of all my data files are available at all times. Foxclone My current preference for a disk imaging solution is Foxclone. This is open-source software, based on a stripped-down version of Ubuntu, that runs as a live-USB. The bootable drive can be created by downloading the Foxclone ISO file and using Balena Etcher as we did when creating our boot disk for Linux Mint (see Trading Up To Linux – Part 1). Foxclone is a front-end for partclone. It supports both MBR and GPT drives, and filesystems such as ext4 or NTFS. The live-USB boots into a Linux desktop with Foxclone being available as an icon on the desktop. Running Foxclone brings up the main program window (Figure 1) on which the main options of current interest are the tabs for Backup and Restore. Figure 1. Foxclone’s Main Screen with the Backup Tab Activated The top two panels in the display for the Backup tab allow the source disk and partitions to be selected for backup. By default, all available disk partitions are checked for inclusion in the backup process but any of these can be unchecked as desired. The lower-left panel is for the selection of the target drive on which the backup files will be stored. Once this has been selected, a file-manager window is displayed that allows the user to drill down into the file system and choose a backup folder and a baseline name for the backup files. The default name includes the current date, e.g. 20250321.backup, etc. A final display screen allows the user to review the backup choices before the process is launched. Progress bars and time estimates indicate the degree of completion of the backup of the disk partition that is currently underway together with that for the backup process as a whole. The backup that is produced essentially consists of file pairs, one pair for each disk partition in the backup, such as the compressed image file, 20250321.sda1.img.gz, and the backup information file, 20250321.sda1-log.txt. Restoring a backup image for an entire drive, or for one or more partitions, is essentially the reverse of the above process. However, if an individual disk partition(s) is to be restored, prior to invoking the Restore tab, it is necessary to use the Settings tab and check the box labelled Enable partition selection since this is disabled by default. The Foxclone User Guide can be downloaded as a PDF file. The guide provides excellent documentation for the software and includes annotated screenshots of the program’s operations. Back In Time This open-source software package is available through GitHub but, for Linux Mint, it can be installed simply by using the Software Manager. Back In Time is a front end for the rsync utility and provides a convenient way to schedule automatic backups of files and folders. Due to the use of hard links, once an initial backup set has been created, subsequent backups are incremental, saving both storage space and the time required to make backups. The first time the program is run, a backup profile is established with the user specifying the storage location for the backup snapshots, an optional schedule for the backup process, the files and folders to be included or excluded from the backups, and an optional retention scheme for historical backups. Other options include enabling notifications, disabling snapshots for a laptop running on battery power, and continuing a backup in the event of errors. A final set of “Expert Options” is headed by a cautionary note to Change these options only if you really know what you are doing. Good advice! My preference is to run Back In Time at every boot/reboot. All snapshots made in the last three days are retained, together with one snapshot per day for 7 days, one snapshot per week for 4 weeks, and one snapshot per month for 24 months. This strategy provides a series of historical backups that are displayed (Figure 2) each time Back In Time is run manually. The left panel shows the set of past snapshots that have been stored. Any of these snapshots can be selected in order to restore a file. The screenshot shows that the snapshot for 2025-02-28 has been selected. The right panel is used to browse for a specific folder and a file within that folder. In the screenshot, the file HoodHeight.py has been selected in the root folder of /media/DataDisk. A pop-up dialogue box asks for confirmation that the selected file is to be restored and provides an optional checkbox to create a backup copy of the file on the hard drive with the current date in the filename. For example, if the Python script file, HoodHeight.py, is being restored to the hard drive on 2025-03-04, then the current file on the hard drive that is being replaced will be renamed by adding .backup.20250304 to the filename. In this case, once the restoration process is complete, the file from the 2025-02-28 backup will have been copied to the hard drive as HoodHeight.py and the file that was replaced on the hard drive will still be present as HoodHeight.py.backup.20250304. Figure 2. Restoring a File from Back In Time’s Main Screen FreeFileSync FreeFileSync is an open-source, cross-platform, file and folder synchronization utility that can be downloaded from the developer’s website (https://freefilesync.org). The download for Linux is a zipped archive file (.tar/.gz) the contents of which are extracted to produce an executable file (.run). To install the software, we open the Terminal, change to the Downloads directory using cd/Downloads, and use the command ./FreeFileSync_14.3_Install.run. The default installation parameters are to install for all users, use /opt/FreeFileSync as the installation directory, and not create desktop shortcuts. These can be modified using menu items if required. Otherwise, just pressing the Enter key, and typing the sudo password, results in FreeFileSync being installed. An entry for FreeFileSync is automatically created in the Accessories category of the main menu that then allows the program to be started. I use a simplified window layout by removing the default Configuration and Overview tabs. I then set the source folder, in the left panel, as my dedicated data partition (/media/DataDisk) and the target folder, in the right panel, as my backup flash drive (media/toaster/SILICON16GB). (Figure 3) Additional configuration options can be selected using the gear icons adjacent to the Compare and Synchronize buttons. The comparison method can be left at the default of file time and size while comparison by file content is an available option. The latter process can be selected if there is a need to ensure that the backup files are bit-for-bit copies of the originals. Most users will likely select mirror as the synchronization method to make the backup on the target drive an exact copy of the source drive. In this case, new or modified files will be copied from the source drive to the target, and files that have been deleted from the source will be deleted on the target. The alternatives are two-way where the newest file on either drive will be copied to the other drive, and files deleted on one drive will be deleted from the other drive, or update where new or modified files are copied from the source drive to the target but no files are ever deleted from the target drive. Figure 3. FreeFileSync Comparison of Two Folders Pressing the Compare button causes FreeFileSync to analyze the files contained in both the source and target folders, and their sub-folders, and to display a preview of the changes that will be made when the Synchronize button is pressed. For the files displayed, the trash can icon indicates a file that is to be deleted, the green right-arrow represents a file that has been modified on the source drive and is to be copied to the target, while the green right-arrow with the plus sign indicates a new file on the target that is to be copied to the target. While FreeFileSync is easy to set up and use for simple file and folder synchronization as noted above, the software has many additional and much more powerful features. These include the ability to establish multiple filters to include or exclude certain items from processing, scheduling batch jobs, synchronization with SFTP and FTP servers, and file versioning. Summary The combination of Foxclone, Back In Time, and FreeFileSync, when used in a regular manner, provide a robust backup solution for the operating system, the installed applications, and user data files. Each of the programs is easy to set up, is highly configurable, and offers an efficient backup process. Bottom Line Foxclone (Open Source) Andy Hardwick Version 53 https://foxclone.org Back In Time (Open Source) Version 1.5.4 https://github.com/bit-team/backintime FreeFileSync (Open Source) Zenju Version 14.3 https://freefilesync.org