Backing up data with mintBackup

Do-It-Yourself Canning

The clever mintBackup not only backs up your files, it also lists your currently installed programs.

Fairly hidden away in the Linux Mint start menu, under Other with the name Backup Tool , you'll find the useful mintBackup [1] program. This tool might provide only a limited number of functions, but it's easy to use, backs up your complete package list, and helps with distribution updates.

To start mintBackup, you need to enter the administrator (for Ubuntu-based Mint) or root password (for Linux Mint Debian Edition). The window in Figure 1 then appears.

Figure 1: The mintBackup main menu is well organized, and all functions are easily recognizable.

To back up your personal documents, just click Backup files then choose the source location and the destination subdirectory for the files. Usually, mintBackup copies the contents of the source directory into the destination location. It's a good idea to have the Destination on an external medium. The root folder that appears by default is actually the /root directory – keep in mind that you started mintBackup with root privileges.

mintBackup doesn't synchronize both directories; it just copies the files. That means if you backed up your photo collection in the Destination directory and deleted an image in Source , you'll still find a copy in Destination even after another backup.

Getting Started

Before you start the backup, expand the Advanced options section of the Backup Tool dialog (Figure 2). So you remember what and when you backed something up, enter a Description . Unfortunately, mintBackup ignores this description completely from that point on and doesn't even refer to it when restoring.

Figure 2: The advanced option lets you Preserve structure of the subdirectories when copying from source to destination. With Checksum mismatch, mintBackup overwrites files only if their contents are different.

You can also have mintBackup package the files in an archive. In Output , you need to specify the archive format. You should also check again which filesystem the Destination uses. For example, FAT32, which you can still find on USB sticks and a few external hard drives, can only handle file sizes of up to 4GB.

The latest mintBackup version 2.0.7 obtained at press time unfortunately ignores these limitations – a rather meaningless error message appears at the end of the backup. If your archive file is larger than 4GB, it will probably be corrupt or have missing files, so you might want to copy file-by-file or check beforehand to ensure that the filesystem can handle larger chunks of data.

Control Authority

If you select Preserve structure in the Output drop-down, mintBackup copies the files instead of creating an archive. If the Destination directory already includes a file by the same name, mintBackup overwrites it – provided you set the correct value for Overwrite .

If Overwrite is set to Checksum mismatch , mintBackup overwrites the file only if its content is different (i.e., the checksums do not match up). Be extra careful with the Modification time mismatch option: mintBackup overwrites the target file even if it's more recent than the copied one. The relevant factor is that the modification times aren't the same.

By default, mintBackup checks to see whether the copy succeeded. If you don't want it to do this, just remove the checkmark from the Confirm integrity option. The file permissions and timestamps are also preserved by default, but you can deactivate both functions by removing the checkmarks next to Preserve permissions and Preserve timestamps , respectively. File permissions only can be preserved either by moving the files into an archive or if the destination filesystem supports them. File permissions for FAT32 and NTFS filesystems are not preserved.

Within directories, mintBackup can follow all symbolic links and back up the files they point to. To set this option, mark the Follow symlinks checkbox. Depending on where the links point to, backing them up can possibly backfire – if you have a symlink pointing to the root directory on a remote server, for example, you might find mintBackup trying to back up entire systems.

Process of Elimination

Once you're satisfied with all the settings, click Forward . In the next dialog, you can exclude specific subdirectories or files from being copied (Figure 3). Here's where you would eliminate those pesky symlinks from the process. Just select the desired file or directory and click the appropriate button.

Figure 3: All selected directories and files in the list are excluded from the backup. To remove an entry from the list, mark it and click Remove.

The directory itself is still backed up in the destination, but it will be empty. If you're creating an archive, the excluded directories will be ignored completely. Once you've selected what to exclude, click Forward to get a confirmation dialog. If everything is okay, click Apply to start backing up.

In the Destination directory, you'll find the hidden .mintbackup file along with all the copied files. Apart from the backup description, the file also contains the source directory name and the number of copied files. This file comes into play later during a restore, so you should not delete or modify it. If you create an archive, the filename includes the creation date, the time, and the word backup . The hidden file .mintbackup will be in the archive.

Restoring

To restore a backup, you can click the Restore files button shown in Figure 1. For an archive, click the Archive option and select (None) as the Source . In the next dialog, select the restore directory as the Destination (Figure 4).

Figure 4: For these settings, mintBackup will restore the B250199F50196AFC directory to clem.

Because mintBackup has to open and inspect an archive, restoring an archive can take quite a long time. At times, it can seem like mintBackup has crashed, but it hasn't.

If the backup is in a directory, you can select the Directory option and then set the Source directory to where the backup is located and the Destination to where you want mintBackup to restore it. Regardless of whether you are restoring from an Archive or a Directory , if files already exist in the destination directory, mintBackup will overwrite them. Set the Advanced options | Overwrite drop-down to suit your needs.

Clicking Forward shows a confirmation dialog (Figure 5). Currently (at least in version 2.0.7), you'll run into a nasty program error: mintBackup ignores the previously configured Source and Destination settings and imposes restoring to the /root directory. Clicking Apply at this point would restore everything there. If this is not what you want, the only solution is to stop mintBackup and copy over the files manually or unpack the archive.

Figure 5: In version 2.0.7, mintBackup, because of a bug, restores everything to the /root directory.

Package Service

Interestingly, mintBackup backs up not only the files but also the list of installed packages upon request. In the main dialog in Figure 1, click the Backup software selection button. Then, you can simply choose where you want to store the package list. Ideally, you would choose a directory on an external drive. In version 2.0.7, however, mintBackup systematically ignores your selection and stores the list in the /root directory again.

Clicking Forward displays the names of all packages mintBackup could potentially back up (Figure 6). You can exclude specific packages by unmarking the checkboxes next to them. As soon as you click Apply , mintBackup writes the list to a file with a name that begins with software_selection_mint@ followed by the date and time of its creation.

Figure 6: You can modify the list of packages the system installed before exporting it.

You can now install all the listed packages at once on another or a freshly installed Linux Mint. Copy the package list onto the target computer, start mintBackup, click the Restore software selection button, select the file with the list in the Software selection drop-down, click Forward , and then wait for the installation to complete. No packages are removed and those already installed are preserved. The software list is particularly useful for applying the same software selection on multiple Linux Mint computers.

Conclusion

For mintBackup to become a full-fledged backup program, it will need to address several missing functionalities, such as scheduled automatic backups and the ability to synchronize with an existing backup. The numerous small bugs in version 2.0.7 are also unacceptable. Another problem is the lack of documentation – the only mention of the program is on mintBackup's project page and in the Mint instructions for a distribution update (see the "Migrating" box).

Migrating

The Ubuntu-based Linux Mint editions cannot be upgraded to a newer version, so you can't simply upgrade from Linux Mint 13 to 14. Mint developers, therefore, recommend that you first use mintBackup to back up both your own files and the package list to external media [2]. Then, you can overwrite the old Linux Mint version with the newer one. Start up mintBackup again on the new system to restore the files and installed software.

Nevertheless, mintBackup can quite easily back up entire directories, making it a nice replacement for a packing program. Especially interesting is its ability to back up the software list – a function that many professional backup programs still don't have.

Infos

  1. Project page for mintBackup: http://community.linuxmint.com/software/view/mintbackup
  2. "How to upgrade to a newer release": http://community.linuxmint.com/tutorial/view/2

The Author

Tim Schürmann is a freelance computer scientist and author. Besides books, Tim has published various articles in magazines and on websites.