C++ HOWTO, Republican Guide to Linux and C++ Essential Questions and Answers
Copyright © Marcel Lambert

Republican Guide to Linux

Appendix D: Backup Planning and Procedures

Download PDF

This section outlines some essential points when making a backup of systems composed of a small number of computers (Linux and Windows) such as SOHO computers. The purpose of backup, obviously, is to provide an opportunity to restore critical files and system data in the case of their accidental or voluntary destruction or corruption. The question of how often to make a backup depends on such issues as how often the data are changed, how critical the data are? I leave this topic off for the answer depends on particular case and fairly subjective. What is more important is to have a plan for backup of your critical files and system settings, which enables you to verify the sequence and check out the vital points. Since backup a fairly rarely procedure relative to common tasks the essential backup procedures might help you to get back on the track if you forget something (in fact, I myself tend to forget backup details and consider backup planning as indispensable). The scope of this section is mainly about the full backup to Data DVDs (Brue-rays, CDs and other backup media are out of scope), and does not cover planning for inremental or differential backups.


General Windows Linux

Select source backup data (what to backup):

  • Personal files (to be taken as-is).
  • Personal files (to be encrypted).
  • Application configuration files.
  • System configuration files.

On this stage you also evaluate the size of source files and the number of backup media such as Data DVD you might need.

When making personal files backup don't forget to consider:

  • The backup of internet browser bookmarks 1 , and other bookmarks (for example internet radio stations and internet TV bookmarks used with Winamp multimedia player).
  • The backup of emails. If you use Thunderbird as email client, simply copy its profile at <homedrive>:\Documents and Settings\<username>\ Application Data\ Thunderbird (this copies profile emails and settings).

When making application configuration files backup consider:

  • The backup of e-mail settings.
  • The backup of your favorite application settings. It is helpful to examine the contents of hidden <homedrive>:\ Documents and Settings\<username>\ Application Data folder, where many applications store configuration and user data.
  • Creating the list of installed applications. Notice that unlike Linux Windows does not provide a standard method for generating such list.

Making system configuration files backup with Windows consider:

  • Full registry backup with regedit for example. The resulting file is typically about 100 MB. Although not small, yet still very small relative to Data DVD size, it can help you to restore the system in case of its failure.
  • The backup of current environment with command like C:\> set > set_environment.txt.
  • The backup of internet settings.
  • Full system configuration backup with Windows System Information utility (msinfo32.exe). The advantage of this method is that it enables you to quickly save detailed system information (hardware, system application settings etc) in one NFO file (typically about 1 MB), which you can later search out with the same msinfo32.exe utility.

Making personal files backup with Linux don't forget to consider:

  • The backup of internet browser(s) bookmarks from Firefox (firefox), Konqueror (konqueror), Galeon (galeon) etc. As with Windows you can take advantage of using one browser for Windows and Linux and making the backup of remotely stored bookmarks such as Foxmarks bookmarks (add-on for Firefox internet browser), which can be used from Windows also.
  • The backup of emails. If you use Thunderbird as email client, simply copy its profile from /<userprofile>/.thunderbird (this copies profile emails and settings). Notice that you can use the same Thunderbird profile for Linux and Windows clients provided that the profile is located on shared drive and default location of Thunderbird profile is updated.

Making application configuration files backup with Linux consider:

  • The backup of Konsole (konsole) history /<user>/.bash_history, its configuration /<user>/.bash_profile, and Konsole's shortcuts frequently used for recording typical console commands.
  • The backup of e-mail settings.
  • The backup of your favorite application settings. It is helpful to examine the contents of hidden /root subfolders, where many applications (such as .thunderbird) store configuration and user data (use /<user> if you are not the ROOT user). For the same sake it is useful to examine the hidden folder /root/.kde/share/apps, where many KDE applications store configuration and user data (for example, the Konqueror file manager store standard and custom profiles under konqueror subfolder).
  • The backup of the full list of packages installed during system setup: /root/install.log (one package might include many applications).
  • The backup, additionally, of the full list of last installed packages 2: # rpm -qa --last > Last_Installed_Packages.txt. The resulting file includes also the mentioned entries from /root/install.log if not deleted.

Making system configuration files backup consider the choices:

  • Partial backup of system setting based on critical system settings. For example, you can backup settings for an VPN internet connection, /etc/fstab file with configuration for partitions, which may include shared Windows-Linux partitions. Consider also the backup of current environment with the command # set > set_environment.txt and making a copy of /etc/profile file (environment variables settings).
  • Full backup of /etc directory, which contains major system settings. This last choice is what I suggest for it might be troublesome and may require valuable time to figure out what system settings are critical for backup and what are not. You also save time since it requires a single action. The size of /etc directory backup archive is typically about tens of MB on Fedora 7 system (20 MB on my system) that is considerably less than the size of full registry backup from Windows XP.
  • Besides /etc directory consider backup of grub.conf from /boot directory, log files from /var/log directory.

Choose intermediate backup location. You can skip this step if the size of your source backup data is small or well organized. In other cases, an intermediate destination (you simply copy source data to this location) serves the following purposes:

  • Prevents accidental data corruption of source files during different intermediate operations such as reorganizing, cleansing etc.
  • Enables you to better organize data to fit backup media such as Data DVD disks.
  • Enables you to encrypt sensitive data in intermediate location if you don't want to encrypt original source data.
  • Enables you to check data with antivirus, antimalware etc programs not affecting original source files. This can be valuable if you operate with these programs recently and not sure of their reliability or effects.
  Linux provides extra benefits of intermediate backup location with the use of symlinks (symbolic links). You can design backup directory structure with symlinks without coping original data to intermediate location. Then you drag-and-drop symlinks along with actual files and folders to the burning application such as k3b and make a backup. In the process k3b follows symlinks as if they were actual folders or files. You cannot work this way with Windows since most close analog of sysmlinks in Windows are shortcuts that, however, are not followed by Windows burning applications. Notice the syntax for creating a symlink: # ln -s <targetdirectory> <softlinkname> (the name of softlink is after the target name).

Choose backup software and backup media. In case of DVD media, make provisions that final disk is read-only (choose DVD+R/DVR-R or be prepared to finalize DVD+RW/DVD-RW on the next step).

Roxio Creator or Nero. K3b (k3b), GnomeBaker (gnomebaker), Graveman! (graveman), Brasero (brasero).

Backup data to backup media and verify files. One of the most essential points of the whole backup process is to provide data integrity 3. At minimum you can consult file properties to make sure that original byte size of all files coincides with that of on destination media. In more rigorous approach you might want to provide with files their checksums (alternatively called control sums, hashes or digests).

If you decided to provide checksums for files consider:

  • Windows analog (md5sum.exe) of Linux md5sum command, which enables you to compute MD5 checksum (128-bit) for a file and verify file integrity with that checksum.

    To create a checksum: run md5sum <fullfilename> (it is assumed that the program was put into the system32 directory and the current directory is the directory of the file for which you want to create a checksum since the particular realization of the program does not work with arbitrary paths). Copy the output into the text file: <fullfilename>.md5 (file name and extension does not matter). Now you can verify the file with the following: md5sum -c <fullfilename>.md5 (assuming that the file is in the same directory with checksum).

  • Generating checksums with GnuPG for Windows, which is the counterpart of the gnupg package installed by default for Linux. Besides MD5, GnuPG works with SHA-1, RMD-160, SHA-256 digests.

When decided to provide checksums for files consider the programs installed with Linux by default:

  • md5sum
  • gpg (the default digest is SHA-1)

Make labels for disks and store backup in safe place. If you used Data DVD media for the backup you might want to put labels on DVD disks reflecting answers on when and what questions. There are 3 additional pieces you need to finish with that:

  • The label-making software.
  • The special photo quality CD Labels (e.g. Fellowes labels) used to print out labels with a color printer.
  • CD/DVD Stomper (or label applicator, which enables you to stick evenly your label with DVD disk front side) 4.
MediaFACE 5 for DVD labeling (I use MediaFACE II, purchased about 10 years ago, which suites me fine up to now). The following software can be used for making DVD labels with Linux:
  • gLabels (glabels) is capable both of making circular DVD labels and making rectangular-type labels for DVD cases.
  • KoverArtist (koverartist), which is capable (v0.5) of making square labels only for DVD cases.
  • cdlabelgen, which is older command-line utility installed by default with Red Hat 9 and available for Fedora 7 from internet repo (see help pages by typing man:cdlabelgen into Konqueror's address bar) capable of making square labels only for DVD cases.

  1. If you use internet from multiple computers (home and office environments, laptop computer) the task of manual synchronization of internet browser bookmarks between different computers becomes daunting and ineffective. In such environment, and especially in mixed Windows and Linux environment, you can take advantage with Firefox's browser (versions are available for windows and Linux) Foxmarks add-on that automates synchronization of bookmarks between different computers (bookmarks are stored on Foxmarks.com or your server, and additionally you have a local synchronized copy). The foxmarks bookmarks was best new software that I discovered for myself in 2008.
  2. The command output will not show you the packages that were installed from source (such as *.tar.gz, *.tar.bz2 etc packages). For example on my Red Hat 9 system, this command does not show k3b (CD/DVD burning application) and thunderbird (compact mail client) packages that were installed from source. You can consult /usr/local folder for such packages since this is the location where these packages are typically installed.
  3. The software might fail to report about problems while burning to the Data DVD media. For example, Roxio 6's Drag-to-Disk does not report about files and folders, which were missed to be copied. The reasons of file/folders burning failures could be long file names (including too deep directory structures), unacceptable characters etc. Typically, you should always verify the file integrity of burned files against source files.
  4. Once label is printed out, detach the label by placing label sheet printed side down on even surface and by peeling the label backing sheet away from the label. Then put the label on DVD stomper with sticky side up and put the DVD disk (data side up) over the center of the stomper and, finally, push down the DVD disk with your fingers on the center of the DVD disk.

Email me: lambert1791 at gmail dot com.