Mac OS X operating systemsAIX operating systemsLinux operating systemsOracle Solaris operating systems

Backing up data using the command line

You can use the incremental or selective commands to perform backups.

The following table shows examples of using these commands to perform different tasks.

Table 1. Command-line backup examples
Task Command Considerations
Incremental backups
Perform an incremental backup of your client domain. dsmc incremental See Incremental for more information about the incremental command.
Back up the /fs1 and /fs2 file systems in addition to the /home, /usr, and /datasave file systems defined in your client domain. dsmc incremental -domain="/fs1 /fs2" See Domain for more information about the domain option.
Back up the /Volumes/fs1 and /Volumes/fs2 file systems in addition to the volumes defined in your client domain. dsmc incremental -domain="/Volumes/fs1 /Volumes/fs2" See Domain for more information about the domain option.
Back up all local file systems defined in your client domain except for the /home file system. dsmc incremental -domain="all-local -/home" You cannot use the (-) operator in front of the domain keyword all-local. See Domain for more information. For Windows clients, you can also exclude the system state domain from backup processing in this way.
Back up only the /fs1 and /fs2 file systems. dsmc incremental /fs1 /fs2 None
Back up all files in the /home directory and all its subdirectories. dsmc incremental /home/ -subdir=yes See Subdir for more information about the subdir option.
Back up all files in the /Users directory and all its subdirectories. dsmc incremental /Users/ -subdir=yes See Subdir for more information about the subdir option.
Assuming that you initiated a snapshot of the /usr file system and mounted the snapshot as /snapshot/day1, run an incremental backup of all files and directories under the local snapshot and manage them on the IBM Spectrum Protect™ server under the file space name /usr. dsmc incremental /usr -snapshotroot=/snapshot/day1 The backup-archive client considers the snapshotroot value as a file space name. See Snapshotroot for more information.
Incremental-by-date backup
Perform an incremental-by-date backup of your default client domain. dsmc incremental -incrbydate Use the incrbydate option with the incremental command to back up new and changed files with a modification date later than the last incremental backup stored at the server. See Incrbydate for more information about the incrbydate option.
Selective backups
Back up all files in the /home/proj or /Users/van/Documents directory. dsmc selective /home/proj/ or dsmc selective /Users/van/Documents/ Use the selective command to back up specific files or directories regardless of whether they have changed since your last incremental backup. You can use wildcards to back up multiple files at once. See Selective for more information about the selective command.
Back up all files in the /home/proj directory and all its subdirectories. dsmc selective /home/proj/ -subdir=yes If you specify -subdir=yes when backing up a specific path and file, the client recursively backs up all subdirectories under that path, and any instances of the specified file that exist under any of those subdirectories.

If a subdirectory is a mounted file system, the client does not back up the files in that subdirectory when you use the subdir=yes option. See Subdir for more information about the subdir option.

Back up all files in the /Users/van/Documents directory and all its subdirectories. dsmc selective /Users/van/Documents/ -subdir=yes If you specify -subdir=yes when backing up a specific path and file, the client recursively backs up all subdirectories under that path, and any instances of the specified file that exist under any of those subdirectories.

If a subdirectory is a mounted file system, the client does not back up the files in that subdirectory when you use the subdir=yes option. See Subdir for more information about the subdir option.

Back up the /home/dir1/h1.doc and /home/dir1/test.doc files. dsmc selective /home/dir1/h1.doc /home/dir1/test.doc If you specify the removeoperandlimit option with the incremental or selective commands, the 20-operand limit is not enforced and is restricted only by available resources or other operating system limits. This allows you to specify more than 20 files on a single command. See Removeoperandlimit for more information about this option.
Back up the /Users/ann/Documents/ h1.doc and /Users/ann/Documents/ test.doc files. dsmc selective /Users/ann/Documents/h1.doc /Users/ann/Documents/test.doc If you specify the removeoperandlimit option with the incremental or selective commands, the 20-operand limit is not enforced and is restricted only by available resources or other operating system limits. This allows you to specify more than 20 files on a single command. See Removeoperandlimit for more information about this option.
Back up a list of files in the /home/filelist.txt file. selective -filelist=/home/filelist.txt Use the filelist option to process a list of files. See Filelist for more information.
Back up all files listed in the /Users/filelist.txt file. dsmc selective -filelist=/Users/filelist.txt Use the filelist option to process a list of files. See Filelist for more information.
Assuming that you initiated a snapshot of the /usr file system and mounted the snapshot as /snapshot/day1, run a selective backup of the /usr/dir1/sub1 directory tree from the local snapshot and manage it on the IBM Spectrum Protect server under the file space name /usr. dsmc selective /usr/dir1/sub1/ -subdir=yes -snapshotroot=/snapshot/day1 The client considers the snapshotroot value as a file space name. See Snapshotroot for more information.