sysback -jR option

Technote (FAQ)


Question

What is the -jR $1 option in backup command files created in smitty sysback Snapshot Backup Options? This technote gives examples and their results.

Answer

The SysBack backup command created from smitty sb_snapshot includes a flag: -jR $1.
This tells SysBack to backup relative to the snapshot mounted on the directory fed to the command by sbsnapshot. When you run sbsnapshot, it creates a directory name /snapshot<pid> where it mounts the snapshots for each filesystem that is snapped, for example, /snapshot12345/test1 and /snapshot12345/test2. It also feeds the name of the snapshot directory /snapshot<pid> to the backup command file as the argument $1. The -jR flag tells the sysback backup command (sysback, mkvgback, mkjfsback, mkdirback, etc) to back up the filesystems relative to the snapshot directory. For example it will backup /test1 relative to /12345snapshot/test1. If the filesystem has not been snapped, it will note that there is no relative filesystem for the filesystem, and back it up normally.

If you create an AIX snapshot without using sbsnapshot, it is possible to use the -jR flag to run backups relative to the AIX snapshot. That is, if you create an AIX snapshot of test1 and mount it op /mnt/test1, you can run SysBack backups relative to the AIX snap. For example, a volume group backup of testvg that backs up relative to the snap would be:

    # mkvgback -jR /mnt -f /dev/rmt0 -x -W -u rootvg


To see how this works, Example 1 shows how run sbsnapshot without invoking a command script, and run sysback backups of rootvg and filesystem /test in the sysback ksh shell.

Example 2 shows how to run AIX snapshot with the snapshot mounted under /mnt, run sysback backups of rootvg and filesystem /test with the -jR option, then unmount and remove the AIX snapshot.

The commands used in both examples are given in the technote; results of running the commands are given in attached files.

Commands were used testing sbsnapshot and AIX snapshot of filesystem /test mounted on /dev/fslv00.
Note that AIX snapshot and sysback sbsnapshot are supported only with JFS2 filesystems.


Example 1: sbsnapshot commands

Run sbsnapshot without -B option to invoke a backup command script; shell out to ksh shell instead for testing purposes
# sbsnapshot -v fslv00

Display snapshot information from sbsnapshot ksh shell
[sbsnapshot]> snapshot -q /test
[sbsnapshot]> df -m

Back up relative to the snapshot directory using mkvgback and mkjfsback from sbsnapshot ksh shell
[sbsnapshot]> mkvgback -jR /snapshot18574 -f tsm1 -x -W -u rootvg
[sbsnapshot]> mkjfsback -jR /snapshot18574 -f tsm1 -x -W -u /test

Exit sbsnapshot ksh shell; sbsnapshot unmounts the snapshot filesystem and deletes the snapshot.
[sbsnapshot]> exit

Example 1 Results.docExample 1 Results.doc


Example 2: AIX snapshot commands

Create and display the snapshot
# snapshot -o snapfrom=/test -o size=8M
# snapshot -q /test
# mount -v jfs2 -o snapshot /dev/fslv01 /mnt/snap/test
# df -m /mnt/snap/test

Backup LV relative to the AIX snapshot
# mkjfsback -jR /mnt/snap -f tsm1 -x -W -u /test

Cleanup the AIX snapshot
# umount /mnt/snap/test
# snapshot -d /dev/fslv01


Example 2 Results.docExample 2 Results.doc


References:
Technote # 1512334: Using sbsnapshot

DeveloperWorks article: Using JFS2 snapshots on AIX 6.1
http://www.ibm.com/developerworks/aix/library/au-jfs2_snapshot.html

Rate this page:

(0 users)Average rating

Document information


More support for:

Tivoli Storage Manager for System Backup and Recovery

Software version:

6.1.2.0, 6.1.3.0

Operating system(s):

AIX

Software edition:

Edition Independent

Reference #:

1576734

Modified date:

2014-08-13

Translate my page

Machine Translation

Content navigation