Copy contents of tape to fs as backup/restore file
 
*
Welcome, Guest. Please login or register. November 21, 2008, 05:20:59 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Copy contents of tape to fs as backup/restore file  (Read 1560 times)
0 Members and 1 Guest are viewing this topic.
brent.weaver
Jr. Member
**
Posts: 13


« Reply #10 on: May 02, 2008, 07:20:03 PM »

re: "p.s. have you tried moving /dev/rmt0 to your chroot env, and then making it again with mkdev - if cfgmgr wont do that for you. It is, after all, just a (special) file."

I have tried that. I cannot use symlinks and am not sure how to move the dev to ./dev in my new env.

I moved over those dir's and and was unable to run cfgmgr.

Let me know if you find anything! Thanks!
Logged
Michael
Administrator
Hero Member
*****
Posts: 526


« Reply #9 on: April 21, 2008, 09:05:52 PM »

The ODM should not be that great an issue: you need a backup/copy of the following directories:

/usr/lib/objrepos
/usr/share/lib/objrepos
/etc/objrepos

and you have a complete copy of the ODM.

That should take care of it. However, I shall also do some tests on a test system tomorrow. Need a bit of time to set that up.

p.s. have you tried moving /dev/rmt0 to your chroot env, and then making it again with mkdev - if cfgmgr wont do that for you. It is, after all, just a (special) file.
« Last Edit: April 21, 2008, 09:08:58 PM by Michael » Logged
brent.weaver
Jr. Member
**
Posts: 13


« Reply #8 on: April 21, 2008, 05:59:53 PM »

Michael -

It would be GREAT if I did not have to copy the tape to disk for it can be a space hog of course. Mkdev is not an option  in my chroot env for it needs ODM and I sure as heck am not dealing with ODM in a chroot env Smiley.... So if you can figure out a way to make rmt0 avail in this env you would be a super hero Smiley

Thanks!
Logged
Michael
Administrator
Hero Member
*****
Posts: 526


« Reply #7 on: April 16, 2008, 04:03:13 PM »

Brent,

Glad to hear it is solved - and I shall experiment a bit more with my solution for copying devices into another directory. I also know due to playing with WPAR that there are additional ways to mount different (parts) of file systems in a read-only mode.

And -  Embarrassed - that I did not think of copying the tape to a file as well.
« Last Edit: April 16, 2008, 04:17:47 PM by Michael » Logged
brent.weaver
Jr. Member
**
Posts: 13


« Reply #6 on: April 14, 2008, 07:01:05 PM »

Hello ... I have figured that due to the chroot env I am unable to use sym links, therefore unable to get access to tape drive. mkdev needs ODM and I am not moving ODM to my chrooted end Smiley

 So I did figure out (w/ help from IBM) how to copy the file as a "image" to disk. The following is the procedure:

# chdev -l rmt0 -a block_size=0
# dd if=/dev/rmt0 of=/filesystem/filename.ext bs=51200

The key was the block size. You can find this out by listing the contents of the tape.

Doing this allows me to chroot into a new env (where the file was moved from tape) and do a restore relative to the new chroot env.

Thank you all for your input on this, and thanks to Ivan in IBM support!
Logged
brent.weaver
Jr. Member
**
Posts: 13


« Reply #5 on: April 14, 2008, 04:24:53 PM »

My new challenge:

/tmpfs/env/dev # ls
.SRC-unix       errorctl        ipl_blv         null            ptyp2           rfwdump         rlvcache5a3587  sad             ttyp1           usbhc0
IPL_rootvg      fscsi0          ipldevice       nuls            ptyp3           rhd1            rlvcachedist    scsi0           ttyp2           usbhc1
SRC             fslv00          iscsi0          nvram           ptyp4           rhd10opt        rlvdb           scsi1           ttyp3           vg00
__vg10          fwdump          kmem            pci0            ptyp5           rhd2            rlvidxware      scsi2           ttyp4           vio0
__vg41          hd1             log             pci1            ptyp6           rhd3            rlvidxzcall     scsi3           ttyp5           vty0
audit           hd10opt         loglv00         pci2            ptyp7           rhd4            rlvmui          ses0            ttyp6           vty1
bpf0            hd2             loglv01         pci3            ptyp8           rhd5            rlvscratch0     sisscsia0       ttyp7           vty2
bpf1            hd3             lsinstall       pci4            ptyp9           rhd6            rmt0            sisscsia1       ttyp8           xti
bpf2            hd4             lvcache5        pci5            ptypa           rhd8            rmt0.1          slog            ttyp9           zero
bpf3            hd5             lvcache5a3587   pci6            ptypb           rhd9var         rmt0.2          spx             ttypa
cd0             hd6             lvcachedist     pci7            ptypc           rhdisk0         rmt0.3          sysdump         ttypb
clone           hd8             lvdb            pci8            ptypd           rhdisk1         rmt0.4          sysdumpctl      ttypc
console         hd9var          lvidxware       pmem            ptype           rhdisk2         rmt0.5          sysdumpfile     ttypd
dac0            hdisk0          lvidxzcall      ptc             ptypf           rloglv00        rmt0.6          sysdumpnull     ttype
dar0            hdisk1          lvmui           pts             random          rloglv01        rmt0.7          tmplv           ttypf
echo            hdisk2          lvscratch0      ptyp0           rcd0            rlsinstall      rootvg          tty             urandom
error           ide0            mem             ptyp1           rfslv00         rlvcache5       rtmplv          ttyp0           usb0
/tmpfs/env/dev # chroot /tmpfs/env /bin/bash
/ # cd dev
bash: cd: dev: Too many levels of symbolic links
/ # ls
.bash_history  64bit          bin            deleted.files  dev            lib            opt            unix           usr
/ # cd dev
bash: cd: dev: Too many levels of symbolic links   <---------------

How do I get around this? It did work however Smiley

Thanks again for the assistance. I may need to copy the contents of the taope
Logged
brent.weaver
Jr. Member
**
Posts: 13


« Reply #4 on: April 11, 2008, 07:12:38 PM »

Hey thanks again!!! Unfort still is not working... I am missing something  Huh
Basically nothing end up in my new root fs.

# echo ./dev/rmt0 | backup -if - | (cd /tmpfs; restore -xqf -)
x ./dev/rmt0
# ls /tmpfs
dev          env

What am I missing? And I cannot thank you enough for taking your time to help me!!!


Logged
Michael
Administrator
Hero Member
*****
Posts: 526


« Reply #3 on: April 11, 2008, 02:27:05 PM »

Ah - my bad - I am so used to copying whole directory structures (using find ./dev | ....)

what you need is:

# cd / # change to the real root first !
# echo ./dev/rmt0 | backup -if - | (cd /cdroot; restore -xqf -)
« Last Edit: April 11, 2008, 05:31:36 PM by John R Peck » Logged
brent.weaver
Jr. Member
**
Posts: 13


« Reply #2 on: April 10, 2008, 07:43:22 PM »

Hey thanks for the response but that ufort does not work:

find ./dev/rmt0 | backup -if - | ( cd /tmpfs/env ; restore -xqf -)
find: 0652-010 The starting directory is not valid.

tried this:

find /dev/rmt0 | backup -if - | ( cd /tmpfs/env; restore -xqf -)
x /dev/rmt0
/tmpfs/env # ls
.bash_history  64bit          bin            deleted.files  lib            opt            unix           usr

Any other suggestions would be apprecated!! Thanks soooo much!
Logged
Michael
Administrator
Hero Member
*****
Posts: 526


« Reply #1 on: April 10, 2008, 05:14:41 PM »

Basically, in the chroot environment - before you chroot, use the following command to "copy your /dev to the chroot env. I am going to call it /chroot.


# cd /
# find ./dev/rmt0 | backup -if - | ( cd /chroot; restore -xqf -)

The nicer way would be to just run the mkdev command and specify /chroot/dev as the new name, but it has been years since I have actually done that from the command line - and I know the above works for "copying" device files.
Logged
brent.weaver
Jr. Member
**
Posts: 13


« on: April 10, 2008, 03:54:31 PM »

I basically need to figure out a way to get a tape to disk as a backup/restore file. This of course is not a restore. I have been looking at my options w tcopy, cpio and dd. Does anyone have a suggestion? Is this even possible?

If I could get /dev/rmt0 in my chrooted env I would not need to do this, but i do not know how to do that.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.669 seconds with 18 queries.




eXTReMe Tracker

Terms of Use and Privacy and Security Policies
Copyright 2001-2008 Michael Felt and ROOTVG.NET