Use the Directives resource to create a directive and apply it to a specific client through the Clients resource. Because every environment is different, it is impossible to prescribe directive-writing rules that work in every case. Instead, examples of the most commonly requested customizations are provided below to give you models to follow.
Assume you want to save only the directory /aaa/zzz on client 123 and no others. This directive restricts Backup from walking the directories /aaa and /zzz to locate and back up other files or subdirectories. This directive invokes a UNIX application-specific module (uasm) called null. The use of null skips files in the directory specified; the use of +null skips files in the directory specified as well as those below the directory specified. The content of the directive to back up only /aaa/zzz appears as follows:
<< / >> uasm: aaa null: *.?<< /aaa >> uasm: zzz<< /aaa/zzz >> +uasm: *.?* |
In another example, assume you want to back up all non-root mounted disks, and back up the /home and /users directories off the root disk. You also want to back up the cron files and the calendar databases. For each client, the Save Set attribute contains the value All. The directive appears as follows:
<< / >> uasm: home users var null: *.?* +null: core<< /home >> +compression: *.?* +null: core<< /users >> * compression +null: core<< /var >> uasm: spool null: *.?* +null: core<< /var/spool >> uasm: calendar cron null: *.?* +null: core<< /var/spool/calendar >> +compression: *.?* +null: core<< /var/spool/cron >> +compression: *.?* +null: core<< /cdrom >> null: *.?*<< /opt >> null: *.?*<< /tmp >> null: *.?*<< /usr >> null: *.?* |
The use of null as part of a directive instructs Backup not to save the specified files during the particular backup, but to include an entry in the index listing created by Backup to indicate that the files were included in the backup operation. Because the files are included in the index, the filenames are available for browsing in the directory and the view of the filesystem through Backup corresponds to the actual filesystem. That is, the recover program's GUI displays files that are available for recovery, even if you skipped the files in more recent backups and the data available for recovery is not as recent as the data available for other files.
This behavior differs slightly from the behavior of the skip uasm directive. The skip uasm results in a view of your filesystem from the browser that reflects the backed-up data, not the closest approximation to the actual filesystem. For these reasons as well as other, more technical, advantages, the use of null is recommended over skip.
You can enter a custom backup command in the Clients resource that includes additional processing instructions. This custom backup command is used instead of the default save program when scheduled backups are initiated.
You can run pre-processing and post-processing commands that execute only once per client backup with the savepnpc program. The savepnpc program, like the save program, saves files to long-term storage. Before performing the first save operation on the client, savepnpc performs any pre-processing commands that exist in the /nsr/res/<group_name>.res file. After the last save operation completes successfully on the client, savepnpc performs any post processing commands listed in the /nsr/res/<group_name>.res file. See "savepnpc " of Appendix B and the man pages for more detailed information about savepnpc.
You can customize your client backups by creating additional programs that affect the way Backup backs up client filesystem data.
For example, you can create a program that shuts down either a mail server or a database before Backup performs a backup operation and then restarts the mail server or database after the backup is completed. Or you can create a program that prints a message (such as backup started at 3:33 a.m.) before the backup operation begins, then executes the backup on the client data and prints a message when the backup is completed (such as backup completed at 6:30 a.m.).
The backup command is performed for each save set that is defined for the client, not on a per-client basis. If you specify a save set value of All, the backup command batch file is executed the same number of times as the number of filesystems on the client. The simplest implementation of a customized backup command is to create a special separate client with a single save set listed in the Save Set attribute.
Consider the following issues as you determine what level of customization works best for your environment:
Amount of disk space you have
Whether you have client data that doesn't need to be backed up every time (for example, company e-mail)
Whether you want Backup to send special messages (in addition to the savegroup completion reports) about the backups it executes
Unlike savepnpc, new instance of the customized Backup Command, like the standard save program, is invoked for each save set listed in the Save Set attribute. Bear this in mind when you create a Client resource with a customized Backup Command for a database, because a shutdown command is executed for each save set you list.