Use

First Backup

In order to create a brand new backup set, simply type:

paxbac <paths to directories>

So if I wanted to backup everything on my hard drive, I would type:

paxbac /

If I wanted to backup just my /home and /usr directories, I would type:

paxbac /home/ /usr

Excluding Certain Files

In order to certain directories and files from your backup, you will have to create a file called “prune”, and put this file inside the important_info directory, which resides inside your home directory for paxbac. (If you have not yet done a backup, you can simply create the important_info directory manually.)

The prune file should consist of one pattern to exclude per line. Lines beginning with “#” will be ignored.

The pattern on each line are regular expressions, so you can use patterns that match directories or groups of files.

Here is an example file with comments:

# this comment will be ignored

# matches *any* directory or file that has /tmp in it,
# such as /home/paul/tmp or /tmp
/tmp

# only matches files in the /tmp directory (and the /tmp 
# directory itself)
^/tmp

# matches any file or directory ending with ~
~$

# matches any file or directory with a '.tmp' extension
\.tmp$


Including Extra Files

paxbac allows you to add additional files to the disk you use as a backup.

Empty Directories List

paxbac does not back up empty directories. If you have to completely restore your hard drive using the pax archives created by paxbac, you will have to create by hand needed empty directories, such as “/tmp”. When you create such directories, you may want to know exactly what permissions the directories on your hard drive before you had to restore it. In order to help with this, paxbac creates a file with empty directories and permissions and stores this file in a directory called emergency_info, found on each backup disk.

paxbac reads through your prune list (see above) and try to gather information about excluded empty directories. It creates a file with empty directory names and permissions.

You can add to this list by creating a text file called “needed_dirs” and putting this file in your paxbac home directory. Each line of this file should contain the path to a directory. Lines beginning with “#” are ignored. paxbac will try to find permission information for each directory and include it on the list of empty directories.

Adding Other Files

If you want to include other files, set the system variable “paxbac_emergency_files”. The value of this variable should be a series of paths to files, separated by white space. For example:

paxbac_emergency_files=“/some_file some_other_file”

Note that because each path is separated by a space, the paths themselves cannot contain spaces.

Setting How Long Ago to Backup

By default, paxbac backs up all files and directories you tell it to, regardless of when they were modified. If you want to backup only files or directories created a certain length of time ago, use the days option. The days option should be either a whole number, or the word “last”. The word “last” indicates that you want to back up all files and directories since your last backup. You should only use this option if you are appending to an existing disk.

If you want to back up all files on your hard drive created 10 days ago, you type:

paxbac --days=10 /

If you want to backup all files created since your last backup, you type:

paxbac --append --days=last /

Determining the Medium for the Backup

By default, paxbac tries to backup on a CD. If you want to backup on another medium, or if you can’t get paxbac to work with your CD burner, you will have to use either the medium or script option.

Using the medium with ask Option

If you specify your medium as --medium=ask, paxbac will pause between the creation of each slice and wait for you to copy that slice on to your medium. If you are backing up 1 Gigabyte of data, and you split up the data into 600 Megabyte chunks, paxbac will pause twice, once after the first 600 Megabytes is created, and once at the end. It will ask you to copy the data created and wait until you press a key to tell it you are ready. See below on making a CD image.

Example:

paxbac --medium=ask /

Using the script Option

If you use the script option, paxbac will automatically execute the script you specify. paxbac executes these scripts with two arguments. The first is the location of the data, and the second is the archive name. Your script can read from the argument line to use this information. See the examples I provided with this download. See below on making a CD image.

Example:

paxbac —script=/usr/bin/copy_paxbac_data.sh /

Telling paxbac to make a CD Image

If you use either the medium or script options, paxbac will put all the data into a directory called “copy_me”. You may want to copy a CD image rather than a directory. In that case, use the image option, which tells paxbac to make a CD image from the directory “copy_me”.

Whether or not you choose the image option, paxbac will give you or the script explicit directions to the path to copy, whether it be directory or image.

Example:

paxbac --image --medium=ask /

Choosing the level

The level option allows you to choose the interactive level of paxbac. By default, the level is 3. If you choose 1, paxbac will run with a bare minimum of messages. If you choose 2, paxbac will give you some informative messages. A level 3 indicates more informative messages, while a level 4 tells paxbac to print out every informative message possible. A level 5 tells paxbac to print out all messages and to pause at many steps of the way.

Example:

paxbac --level=3 /

Checking Files

In addition to setting the level, paxbac gives you one more option to interact with the script. This option is --check-files, or -c. It tells paxbac to pause once, right after the size of the whole backup is determined. At this stage, you will asked if you want to check the files. Go the paxbac home directory and look at the “files_created_today” file and the “files_excluded_today” file to make sure nothing is improperly included or excluded. These files list the files backed up by size, with the larges files appearing first. When you are done checking, press any key to continue.

Examples:

paxbac -c /

paxbac -check-files /

Subsequent Backups

After you have made several backup sets, you will want to append to one of these sets rather than make a new backup each time. In this case, use the append or -a option. paxbac will look for a CD or other disk to append to. If it can’t find one, it will wait until one is loaded, giving you appropriate messages.

Examples:

paxbac -a /

paxbac --append /

Replacing Lost or Damaged Disks

If one of your disks gets damaged, paxbac will attempt to replace the data on the disk. It does so by determining what files were on that particular disk, and then backing up those files. If the files no longer exist on your hard drive, then paxbac cannot replace it.

In order to replace lost disk(s), use the --repair option. paxbac will allow you to choose from all sets you have created, and then let you choose from disk(s) within that set.

In addition to replacing those disks, paxbac can also backup at the same time. If you want to backup at the same time you replace a disk, use the same options you would to do a normal backup.

This example simply tells paxbac to do a replace:

paxbac --repair

This example tells paxbac to replace, and to do a backup since the last backup:

paxbac --repair --days=last /

Doing a Test Run

You can do a test run with paxbac by using the --test-run option. This option tells paxbac to create temporary images instead of burning CDs. Follow the instructions.

Example:

paxbac --test-run /

Determining the Configuration

If you want to now the values of all options paxbac is using, use the --config option. This option causes paxbac to print out a list of values and then quit.

Example:

paxbac --config

Printing Help

To print a help message, type:

paxbac --help

Verifying a Set

After you have backed up to a set for a long time, you may want to verify that the set is still valid. In this case, type:

paxbac --verify-set

The script will ask you which set you want to verify, and will then prompt you to inset a disk, checking one member at a time.

home