Backing Up and Restoring Files and Folders

Some work environments provide robust and carefully tested procedures for backing up data on users’ systems, so that a failed disk or a slip of the hand on the mouse will not result in irretrievably lost data. But a surprising number of organizations do not provide adequate backups. Some back up their servers but not desktops. So you may be responsible for taking care of any data that’s important to you. And if you are using a computer system at home, you definitely need to perform your own backups.

JDS provides for data protection with a backup and restore facility. JDS File Backups and File Restores work in tandem to:

  • Create a compressed archive of files and folders.

  • Write the archive to one of several removable media types.

  • Restore them later if necessary.

A compressed archive can be stored on your choice of:

  • Floppies

  • Zip disks

  • CD-ROM disks

The compressed archive takes up less room than the original data does on your hard drive. For instance, if you put all your files in a single directory, it may take up 800 million bytes of data, or 800 megabytes. By using a program to compress them, they could be reduced to a size of only 80 megabytes.

We call the collection of those compressed files an archive. Archives take a collection of files and put them into a single file. So if you had 100 files in your documents directory and you compressed them into an archive, we could call that archive documents.tar.gz. We could then transfer the archive to off-line storage as a single file rather than 100 files.

Archives serve as an important service in data management. If your machine fails, you could lose all the files you created. Before that happens, you want to save them so your work won’t be lost forever. If you back up your data frequently, you’ll have more recent data to restart from after disaster strikes.

JDS Backup Module

The JDS backup module helps you generate a system-wide backup. It will also break up the archive into multiple volumes to allow you to fit the entire archive on several disks, if necessary. For example, if you are using CD-ROM disks to store your backups and you have an archive too large for a single CD-ROM, JDS backup module will break the archive into a set of files to fit on the CD-ROMs. The filenames created from the archive would be listed as 01_archive.tar.gz, 02_archive.tar.gz, etc. This will let you copy each on a recordable CD-ROM.

Unlike enterprise backup programs, the JDS archive saves information only about changed packages, storage areas for system and user files, and configuration files. The JDS developers saw little reason to backup the RPMs that already existed on your installation CD-ROM. This allows you to create a smaller image. Backups made in this manner take less time and allow for an efficient way to reconstitute the system.

Before starting your backup, make sure you have enough space in the partition containing the /tmp directory to store all the files being backed up. As the name suggests, /tmp provides temporary storage during backup. You can find how much free space exists in your partitions by running the df command. If /tmp is larger than /home (which contains the bulk of the data you are backing up), you probably have enough temporary space.

Unmodified, the JDS backup files include information about packages changed since the original installation and your home directory files, which includes patches installed with Online Update and software added by the methods we discussed in the two earlier sections of this chapter.

Tip

You should restore from the Backup Files modules only if your system goes down completely. For saving data files from your home directory, use the GNOME CD Burn available in the Nautilus File Manager discussed in Chapter 3 or use another removable media system such as Iomega Zip Disks.

The backup procedures grab information not related to packages themselves, including configuration files and folders in your home directory. The backup will include storage areas on the hard disk crucial to system restoration including the partition table and master boot record (MBR) which includes the bootloader.

Figure 5-13 shows the first dialog window generated when you initiate a backup from Launch Applications System Tools Administration File Backups. This differs from the menu in JDS 2003, which simply uses Launch Applications System Tools Backups.

JDS file backup

Figure 5-13. JDS file backup

JDS calls the first screen of the program the backup module. This module searches for files in the system and creates the backup archive. The backup module requests an archive name, type, and description.

In our example in Figure 5-13, we named the archive /tmp/dallas.tar.gz. That means JDS will store the archive in the /tmp directory and will store the archive in a compressed tar file (tar stands for tape archive, a term left over from earlier Unix times). You have an option to enter a description to help you remember what you’re backing up; in this case we described the backup “Home files as of June 15.”

The archive will contain files from packages that were changed since package installation or upgrade. Files that do not belong to any package can be optionally added to the archive.

If you press the Options button in Figure 5-13, Figure 5-14 appears to show the options available for storing all your data. The example shows that we chose CD-R-RW disks. The backup will create a multivolume archive to fit on the 74-minute blank disks.

Archive Options

Figure 5-14. Archive Options

The Search setting allows you to select the parts of the system you want to search and backup. Your options include:

  • Search files that do not belong to any package

  • Backup hard disk system areas

  • Check files before creating the archive

MD5 sums can be used to determine whether the file was changed. These are more reliable than checking size or modification time, but take more time.

You can also exclude areas you do not want searched, which typically include:

  • /tmp

  • /var /lock, /var/run, /var/tmp, and /var/cache

You can also add directories such as /home/username/staroffice7 and /home/username/.mozilla.

Once you choose the folders to exclude, you can send the backup module off on a search for files to include in the archive. A screen similar to Figure 5-15 will show you the progress of the search. The search takes a number of minutes and ends up by creating a list of files similar to the one seen in Figure 5-16. This is a list of files found. A check mark in the first column indicates that the file will be backed up. You can uncheck a file, and it will not be included.

Backup search screen

Figure 5-15. Backup search screen

Files setected to archive

Figure 5-16. Files setected to archive

Once you accept the list by pressing Next on detected file list, the backup module will begin the process of building an archive table and map. The information to restore the system exists in a file called autoinst.xml. The information about the files created for archives exist in the Backup summary details, as shown in Figure 5-17. You reach the backup details by clicking the details button, shown in Figure 5-18.

Backup summary

Figure 5-17. Backup summary

Backup summary details

Figure 5-18. Backup summary details

After the backup modules build the table and restore information, it provides you with summary information, as seen in Figure 5-18. Notice that the information in this figure provides you with the types of files archived and the location of the autoinstallation profile. The screen also tells you to click Details to see more information.

The errors mentioned in Figure 5-18 were insignificant. The backup module refused to back up the unnecessary cache of Internet Explorer, installed by Codeweavers Crossover office.

In Figure 5-18, you can see the detailed summary of the backup process including the archive volumes created. They include (in this case) two files, which will fit on recorded CD-ROMs: 01_dallas.tar.gz and 02_dallas.tar.gz.

The next step in the process would be to create the backups on the CD-ROMs. The easiest course is to use Nautilus to create the CDs: open the desktop icon “Documents”, then choose Go CD Creator in the toolbar menu. Be sure to include autoinst.xml on the disk containing 01_dallas.tar.gz.

JDS Restore Module

The Restore Files program enables you to restore your system from a backup archive, such as the one we created in the previous section of this chapter. You can enable the restore module by selecting Launch Applications System Tools Administration Files Restores. This brings forth the screen in Figure 5-19.

JDS restore module

Figure 5-19. JDS restore module

As you can see in Figure 5-19, the instructions exist on the left sidebar. Some further explaination follows.

Restore module

Just remember that using this is all a measure of last resort. You do not want to restore data files you may have deleted by accident from this backup archive. Use the restore function only if you have completely crashed your system and this is the only way to recover.

Archive selection

If you use this option, specify the name of the first file you made when you backed up your system, such as 01_dallas.tar.gz.

Local file

This option can be used if you copied an archive from a CD or some other off-line media to a normal disk.

Network

Backup archive can be read from network using NFS. If your achived files exist on a server, you can mount the Network File System directory and see the file in your directory tree.

Removable device

This is somewhat like “Local file,” but mounts the disk first.

The JDS Restore Files module helps you restore your system from a backup archive. Usually, you will have reinstalled your system from the original media and then selected the restoration media. When you get the screen in Figure 5-19, you specify the location of the backup archive, such as “cdrom.” In Figure 5-20, you can see the first options in the /media directory.

The restore module

Figure 5-20. The restore module

Once you select the file, you will find the backup archive. For example, if you chose cdrom under files, the window would next provide a listing of the files on the CD-ROM disk. When you select the file, you will be taken back to the screen in Figure 5-19.

Press Next to proceed. As you continue, a description and the contents of the individual archives displays. You can then choose what to restore from the archives.

Two options exist for:

  • Uninstalling packages that may have been added since the last backup

  • Renewed installation of packages that you may have deleted since the last backup

The two options allow you to restore the system state as of the last backup.

The restore module installs, replaces, or uninstalls many packages and files. Use it only if you have had a major system failure. Otherwise, to save and restore data files from your home directory, use a removable medium or store them on a server.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.152.159