Backup to a remote tape device. Is it possible?


 
Thread Tools Search this Thread
Operating Systems AIX Backup to a remote tape device. Is it possible?
# 1  
Old 10-15-2012
[Solved] Backup to a remote tape device. Is it possible?

Hi all
The situation is as follows:
We need to take an mksysb image from an AIX 6.1 server. From some reason (irrelevant to this discussion) this server does not have access to a local CD-ROM or a tape drive. We do have another server with AIX 6.1 (but different technology level) which got access to a tape device. Both servers are connected through LAN. Can i make an mksysb image from server 1 and - somehow - write it to the tape device of the second server? I need the tape to be bootable that's why i am not just FTPying the mksysb image to the target server.
Any suggestions?

---------- Post updated 10-15-12 at 01:59 AM ---------- Previous update was 10-14-12 at 11:59 AM ----------

Ok everybody i found the solution. For anyone who's searching for this here is the answer:
The scenarios is as follows:

Machine A : We need to take an mksysb image on a tape. The tape should be bootable. The machine does not have access to a tape drive.

Machine B: Does have access to a tape drive and is connected to machine A via LAN.

Procedure:

A bootable tape as a result of mksysb contains 4 records (set of data).

Boot image - should contain all drivers from and for backed up server, so I reccomend to create own image for every backed up server (Doesnt take a lot of time anyway)
mkinsttape image - contains some install data and structure and mountpoints of rootvg
Dummy "Table of Content" record - not used, it is here only for some compatibility reasons
mksysb image - archive of rootvg files - the "core" part of tape
Steps: (our working directory on both servers will be /opt)

Machine A:

Create a bootable image on machine A:
Code:
bosboot -ad /dev/rmt0 -b /opt/1_bosboot.img

Mkinsttape image:
Code:
mkinsttape /opt/2_mkinsttape.img

mksysb image:
Code:
mksysb -e -i -p /opt/4_mksysb.img #### with -e is for exluding files, it is optional only

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 machine B via FTP or SCP or whatever method.
Machine B:

Prepare the tape
Code:
chdev -l rmt0 -a extfm=yes

Rewind it
Code:
tctl -f /dev/rmt0 rewind

Change the block size to 512
Code:
chdev -l rmt0-a block_size=512

Rewind it again
Code:
tctl -f /dev/rmt0 rewind

Write the first file
Code:
dd if=/opt/1_bosboot.img of=/dev/rmt0 bs=512 conv=sync

Rewind the tape
Code:
tctl -f /dev/rmt0 rewind

Position the writer to write after the first file:
Code:
tctl -f /dev/rmt0.1 fsf 1 ## Notice that we used the non-rewindable device rmt0.1 rather than the normal one rmt0

Write the second file:
Code:
dd if=/opt/2_mkinsttape.img of=/dev/rmt0.1 bs=512

Rewind
Code:
tctl -f /dev/rmt0 rewind

Position the writer to write after the second file:
Code:
tctl -f /dev/rmt0.1 fsf 2

Create and save the dummy TOC to tape (required by bootable tapes):
Code:
echo "Dummy tape TOC" | dd of=/dev/rmt0.1 bs=512 conv=sync

Rewind:
Code:
tctl -f /dev/rmt0 rewind

Position the writer to write after the third file:
Code:
tctl -f /dev/rmt0.1 fsf 3

Write the final file:
Code:
dd if=/opt/4_mksysb.img of=/dev/rmt0.1 bs=512

Eject the tape and you're done.
This User Gave Thanks to abohmeed For This Post:
# 2  
Old 10-15-2012
Many thanks for writing a follow-up.

I am going to change the thread title to "[Solved]".

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Failed to open tape device /dev/rmt/0mn:Device busy (errno = 16)

Hi, Unable to make tape backup, please help. /opt/ignite/bin/make_tape_recovery -a /dev/rmt/?mn -I -v -m tar -x inc_entire=vg00 * Creating local directories for configuration files and archive. ======= 04/25/16 16:28:08 IST Started /opt/ignite/bin/make_tape_recovery. (Mon... (4 Replies)
Discussion started by: anuragr
4 Replies

2. UNIX for Dummies Questions & Answers

Remote Tape Backup Using cpio

Hi all, I've got two HP machines running HP-UX 11.31 and would like to remotely backup one server onto another server's tape unit using the cpio command. The two servers use a secured communication channel, i.e ssh. Kindly help, Koketso (1 Reply)
Discussion started by: Koketso
1 Replies

3. Solaris

Backup to remote tape drive

Hello all, I'm trying to backup some files on a solaris 10 machine to the remote tape drive connected to another solaris 10 machine. I have set up rsh to allow for password-less connection between the servers, but I'm not able to write to the tape with the command: root@sdp4a>tar cvf... (1 Reply)
Discussion started by: kerrygold
1 Replies

4. Solaris

define .rhost file for tape backup to remote host

howdy experts, i am using 2 server- Solaris 5.9 i have tape device attached with 1 of my solaris server. But others not. # modinfo|grep tape 152 13d43e4 1333c 33 1 st (SCSI tape Driver 1.231) now i want to Backup DATA file and System File in Tape Drive. How do I take data and... (3 Replies)
Discussion started by: thepurple
3 Replies

5. Solaris

backup through tar command on remote tape

Hello Everybody I have two servers, name A & B. I need to take a backup of one directory(/girish) on serverA. But my tape drive is in serverB through tar command. But when I run the following command it doesn't take the backup. Could any one correct my command to take a backup tar cvf - ... (0 Replies)
Discussion started by: girish.batra
0 Replies

6. Solaris

flarcreate to remote tape device

Hi, Someone knows hot to create a flash archive to a remote tape device? Here is my try: $flarcreate -n nereus -S -t lisdev:/dev/rmt/1n WARNING: hash generation disabled when using tape (-t) current filter settings Creating the archive... ERROR: Unable to work archive. Regards (4 Replies)
Discussion started by: spacewalker
4 Replies

7. Solaris

Backup over network to remote tape drive

I am currently using tar to backup a server that has 9gb of data. This is fine and works fine, as part of this I send the backup to a remote tape on a remote server using rsh.. This is not very secure though is it? Whats the best idea here - is there another way I should do this to be more... (1 Reply)
Discussion started by: frustrated1
1 Replies

8. Shell Programming and Scripting

remote tape backup

i have two main servers which are both hpux. the problem is that i only have single dat drive to use with my backup (using tar command). it always takes me alot of time to perform this activity since the backup can only be done one at a time. there are other hpux box with a dat drive attached on... (3 Replies)
Discussion started by: inquirer
3 Replies

9. UNIX for Advanced & Expert Users

rsh: remote tape backup

I am trying to perform a remote tape backup from one SCO openserver to another remote SCO Openserver which happens to have a tape drive configured. I have added entries into host.equiv and .rhosts on the tape drive server: prodution_server root # This is equivalent to the hostname and... (1 Reply)
Discussion started by: cstovall
1 Replies

10. UNIX for Dummies Questions & Answers

cpio backup to a remote device..

Hi, Needing to perform a backup of one system to the tape unit on another system. Why, well because the local tape device is stuffed and I desparately need to have a backup completed successfully sooner rather than not at all. My question is how do I set the below code to allow me to perform... (3 Replies)
Discussion started by: Cameron
3 Replies
Login or Register to Ask a Question