How 2 Know
If you can't Google it, You Can Knowing it.

how to take remote backup without tap unit

Remote Backup on AIX System
Dears,

I found a way to take remotely backup from AIX System from Server that doesn’t have TAP UNIT.

Suppose that the server that we want to take backup from it is ServerA, and the server that has TAP Unit is ServerB.

Steps:

– On ServerA :

1- Create a bootable image on ServerA:

#bosboot -ad /dev/rmt0 -b /tmp/1_bosboot.img

2- Mkinsttape image:

#mkinsttape /tmp/2_mkinsttape.img	## *mkinsttape

3- mksysb image:

#mksysb -e -i -p /tmp/4_mksysb.img 

Notice that the files are named in the order they will be written on the tape.
Copy the three resulting files: 1_bosboot.img, 2_mkinsttape.img, and 4_mksysb.img to ServerB via FTP or SCP or SFTP or whatever method.
– ServerB:
1- Prepare the tape

#chdev -l rmt0 -a extfm=yes	## The extfm mean Use *EXTENDED file marks

2- Rewind it

#tctl -f /dev/rmt0 rewind

3- Change the block size to 512

#chdev -l rmt0-a block_size=512

4- Rewind it again

#tctl -f /dev/rmt0 rewind

5- Write the first file

#dd if=/tmp/1_bosboot.img of=/dev/rmt0 bs=512 conv=sync

6- Rewind the tape

#tctl -f /dev/rmt0 rewind

7- Position the writer to write after the first file:

#tctl -f /dev/rmt0.1 fsf 1 ## Notice that we used the non-rewindable device rmt0.1 rather than the normal one rmt0

8- Write the second file:

#dd if=/tmp/2_mkinsttape.img of=/dev/rmt0.1 bs=512

9- Rewind

#tctl -f /dev/rmt0 rewind

10- Position the writer to write after the second file:

#tctl -f /dev/rmt0.1 fsf 2

11- Create and save the dummy TOC to tape (required by bootable tapes):

#echo "Dummy tape TOC" | dd of=/dev/rmt0.1 bs=512 conv=sync

12- Rewind:

#tctl -f /dev/rmt0 rewind

13- Position the writer to write after the third file:

#tctl -f /dev/rmt0.1 fsf 3

14- Write the final file:

#dd if=/tmp/4_mksysb.img of=/dev/rmt0.1 bs=512

15- Eject the tape and you’re done.

– HINTS:
* mkinsttape:
The mkinsttape image contains files to be loaded into the ram file system when booting in maintenance
*Extended File Marks:
Setting the Extended File Marks attribute (for chdev command, the extfm attribute) to the no value writes a regular file mark to tape whenever a file mark is written. Setting this attribute to the yes value writes an extended file mark. For tape drives, this attribute can be set on. The default value is no. For example, extended filemarks on 8 mm tape drives use 2.2 MB of tape and can take up to 8.5 seconds to write. Regular file marks use 184 KB and take approximately 1.5 seconds to write.
To reduce errors when you use an 8 mm tape in append mode, use extended file marks for better positioning after reverse operations at file marks.
* The File Names 1_bosboot.img, 2_mkinsttape.img and 4_mksysb.img can be changed to be anything else we just care by the files order.
* The Normal mksysb Steps :
The following is a description of mksysb’s four images.
———————————————————
| Bosboot | Mkinsttape | Dummy TOC | rootvg |
| Image | Image | Image | data |
|———– ————– ————- —————-|
|<----------- Block size 512 ----------->| Blksz defined |
| | by the device. |
———————————————————

– Reference :
o http://www.unix.com/aix/203513-solved-backup-remote-tape-device-possible.html

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from How 2 Know

Subscribe now to keep reading and get access to the full archive.

Continue reading