backing up with tar

backing up with tar

Post by vervoo » Tue, 05 Feb 2002 18:01:59



Hi,

I want to back up an AIX (4.3.3.0) box. The problem I have is that the
tape device is attached to another AIX box and the cable for that, won't
fit the one I want backed up.

I'm told that in order to run mksysb though, I need to have the tape
machine physically attached to the box, therefore I need to back it up
over the network.

My colleague has suggested using tar and given me the following command
to run from the box with the tape attached (rhosts authentication is set
up so no password required):

rsh host_to_backup tar cf - / > host_to_backup.tar > /dev/rmt0

Unfortunately this just creates an empty host_to_backup.tar file. I
really don't know anything about doing backups, so if someone could put
me back on the right track, I'd be really grateful.

Cheers,

JS.

 
 
 

backing up with tar

Post by S.Llabre » Wed, 06 Feb 2002 00:58:44



> Hi,

> I want to back up an AIX (4.3.3.0) box. The problem I have is that the
> tape device is attached to another AIX box and the cable for that, won't
> fit the one I want backed up.

> I'm told that in order to run mksysb though, I need to have the tape
> machine physically attached to the box, therefore I need to back it up
> over the network.

> My colleague has suggested using tar and given me the following command
> to run from the box with the tape attached (rhosts authentication is set
> up so no password required):

> rsh host_to_backup tar cf - / > host_to_backup.tar > /dev/rmt0

> Unfortunately this just creates an empty host_to_backup.tar file. I
> really don't know anything about doing backups, so if someone could put
> me back on the right track, I'd be really grateful.

> Cheers,

> JS.

Hello.

Really an empty file (0 bytes)?
Have you tested if the rsh really works without password
identification  (which is a security problem btw.)

try as example "rsh host_to_backup ls /". It should give you a listing
of the root directory of the machine you want to backup.

If this works there is another error in your command:
The part "> host_to_backup.tar" in your creates a file one the
machine with the tape attached. But from that point you cannot
further pipe into /dev/rmt0".

To write to tape you should try something like:
"rsh host_to_backup tar cf - / |  dd ibs=512 obs=16384 of=/dev/rmt0"

Be aware that an tar is not the best tool for disaster recovery
preparation...

Bye, Stefan...  .       .

 
 
 

backing up with tar

Post by vervoo » Wed, 06 Feb 2002 00:19:08


Thanks Stefan,

Another person has suggested I use cpio as follows:

find / /usr /var -xdev -print | cpio -oBr > /tmp/backup.cpio

which works except for files owned by group nobody (which has gid -2).
I get messages complaining the file couldn't be archived because the
file's gid cannot be greater than 65535. Do you know if I can get round
this? Would it be OK to change the gid to another number?

JS.



>>Hi,

>>I want to back up an AIX (4.3.3.0) box. The problem I have is that the
>>tape device is attached to another AIX box and the cable for that, won't
>>fit the one I want backed up.

>>I'm told that in order to run mksysb though, I need to have the tape
>>machine physically attached to the box, therefore I need to back it up
>>over the network.

>>My colleague has suggested using tar and given me the following command
>>to run from the box with the tape attached (rhosts authentication is set
>>up so no password required):

>>rsh host_to_backup tar cf - / > host_to_backup.tar > /dev/rmt0

>>Unfortunately this just creates an empty host_to_backup.tar file. I
>>really don't know anything about doing backups, so if someone could put
>>me back on the right track, I'd be really grateful.

>>Cheers,

>>JS.

> Hello.

> Really an empty file (0 bytes)?
> Have you tested if the rsh really works without password
> identification  (which is a security problem btw.)

> try as example "rsh host_to_backup ls /". It should give you a listing
> of the root directory of the machine you want to backup.

> If this works there is another error in your command:
> The part "> host_to_backup.tar" in your creates a file one the
> machine with the tape attached. But from that point you cannot
> further pipe into /dev/rmt0".

> To write to tape you should try something like:
> "rsh host_to_backup tar cf - / |  dd ibs=512 obs=16384 of=/dev/rmt0"

> Be aware that an tar is not the best tool for disaster recovery
> preparation...

> Bye, Stefan...  .       .

 
 
 

backing up with tar

Post by Sgille » Wed, 06 Feb 2002 00:43:21


Sysback let you backup systems on the network that can be restored...Perhaps
you should look into that...it is about $400...and is sold by IBM global
services...
http://sysback.services.ibm.com/

Remember tar and cpio are not bootable, and to restore your system you will
have to jump through a few hoops to get it up and back the way it was...Tar
and cpio are fine for your data...but not system files, (my
opinion).............Sysback is the way to go if you cannot have a tape
drive...on the machine.............
or mksysb to a file and nim restore.............using that file............

You can try:
      tar -bl -cf - . | rsh YOURREMOTEHOST "dd ibs=512 obs=1024
of=/dev/rmt0"

      Restore from a remote, could look like this:
      cd for file that begin ./home/myname

      rsh remote_hostname "dd if=/dev/rmt1 bs=1024" | restore -xqvf -

      Which if you break this apart has a dd executing on remote_hostname
that read a tape on rmt1 and places the data on stdout which the rsh pulls
back to the local machine, a pipe to move data between commands, then
restore executing on the local machine reads data from stdin and writes the
output.

---------------------------------------------------------------------


> Hi,

> I want to back up an AIX (4.3.3.0) box. The problem I have is that the
> tape device is attached to another AIX box and the cable for that, won't
> fit the one I want backed up.

> I'm told that in order to run mksysb though, I need to have the tape
> machine physically attached to the box, therefore I need to back it up
> over the network.

> My colleague has suggested using tar and given me the following command
> to run from the box with the tape attached (rhosts authentication is set
> up so no password required):

> rsh host_to_backup tar cf - / > host_to_backup.tar > /dev/rmt0

> Unfortunately this just creates an empty host_to_backup.tar file. I
> really don't know anything about doing backups, so if someone could put
> me back on the right track, I'd be really grateful.

> Cheers,

> JS.

 
 
 

backing up with tar

Post by S.Llabre » Wed, 06 Feb 2002 02:04:59



> Thanks Stefan,

> Another person has suggested I use cpio as follows:

> find / /usr /var -xdev -print | cpio -oBr > /tmp/backup.cpio

> which works except for files owned by group nobody (which has gid -2).
> I get messages complaining the file couldn't be archived because the
> file's gid cannot be greater than 65535. Do you know if I can get round
> this? Would it be OK to change the gid to another number?

* Why the "-r" option for the cpio command?

* You run this in a rsh?
    If so i think you must quote the pipe to
    find / /usr /var -xdev -print "|" cpio -oBr > /tmp/backup.cpio
    because you want to run the cpio on the machine with the
    tape attached, not on the system you want to backup.

* This would backup the files to a new file named "/tmp/backup.cpio",
    not to a tape device. I thought you would like to backup to tape??

* This would at least do not backup the home directory on a standard
    AIX installation (home is a different filesystem, not in the list and
excluded
    by the "-xdev" option).

Referring your problem with the gid; the manual says:

         Note: Files with uid's and gid's greater than 65535 cannot be
archived
         using the cpio command. In such instances, the user should use
backup
         and restore.

Changing the gid would not be a solution as this would render the group
nobody useless (and there will be a reason that someone has used this group
for the files)
I cannot find files owned  by "nobody" on a vanilla 4.3.3 installation. Do
you
have applications installed in the rootvg?

Bye, Stefan...  .       .

Bye, Stefan...  .      .          .

 
 
 

backing up with tar

Post by jsmit » Wed, 06 Feb 2002 06:48:41


Hi try using mkcd - create an image (like mksysb) and then ftp it to a
workstation with a CD Burner - use Adaptec to burn the image as an iso
image. You can then boot the CD and restore - works great. Do a man on mkcd
for more info. The cdrecord tools are found on the Bull site.


Quote:> Hi,

> I want to back up an AIX (4.3.3.0) box. The problem I have is that the
> tape device is attached to another AIX box and the cable for that, won't
> fit the one I want backed up.

> I'm told that in order to run mksysb though, I need to have the tape
> machine physically attached to the box, therefore I need to back it up
> over the network.

> My colleague has suggested using tar and given me the following command
> to run from the box with the tape attached (rhosts authentication is set
> up so no password required):

> rsh host_to_backup tar cf - / > host_to_backup.tar > /dev/rmt0

> Unfortunately this just creates an empty host_to_backup.tar file. I
> really don't know anything about doing backups, so if someone could put
> me back on the right track, I'd be really grateful.

> Cheers,

> JS.

 
 
 

backing up with tar

Post by Tom Kis » Fri, 08 Mar 2002 08:16:43


I was reading the news and saw your suggestion.  It looked like a neat idea
so I tried it.  The problem I am having is that I keep getting the following
error message when I try to create the CD image :

Command: failed        stdout: yes           stderr: no

Before command completion, additional instructions may appear below.

Initializing mkcd log: /var/adm/ras/mkcd.log...
Verifying command parameters...
0512-305 mkcd: /usr/sbin/mkrr_fs must be a link to the
appropriate OEM routine.

+--------------------------------------------------------------------------+
  |                           SHOW COMMAND STRING
|
  |
|
  | Press Enter or Cancel to return to the
|
  | application.
|
  |
|
  |   /usr/sbin/mkcd  -m '/image/sej40' -C '/image' -I '/image' -V 'sevg'  '
|
  |   -R' '-S'  -i '/image.data'

I included the screen from SMIT to show the error and command it was using.
Any ideas?

--
Tom Kish
Systems Engineer
CMHC Systems
www.cmhc.com

(614) 764-0143


> Hi try using mkcd - create an image (like mksysb) and then ftp it to a
> workstation with a CD Burner - use Adaptec to burn the image as an iso
> image. You can then boot the CD and restore - works great. Do a man on
mkcd
> for more info. The cdrecord tools are found on the Bull site.



> > Hi,

> > I want to back up an AIX (4.3.3.0) box. The problem I have is that the
> > tape device is attached to another AIX box and the cable for that, won't
> > fit the one I want backed up.

> > I'm told that in order to run mksysb though, I need to have the tape
> > machine physically attached to the box, therefore I need to back it up
> > over the network.

> > My colleague has suggested using tar and given me the following command
> > to run from the box with the tape attached (rhosts authentication is set
> > up so no password required):

> > rsh host_to_backup tar cf - / > host_to_backup.tar > /dev/rmt0

> > Unfortunately this just creates an empty host_to_backup.tar file. I
> > really don't know anything about doing backups, so if someone could put
> > me back on the right track, I'd be really grateful.

> > Cheers,

> > JS.

 
 
 

1. APC USB ups, Back-UPS ES series, 2.5.68

(Please cc: me on reply)

I'm wanting to get this new toy up and running.  I've installed apcupsd,
but it doesn't want to work well with my kernel (2.5.68) or somewhat.

When apcupsd tries to open the hiddev, open() gets an ENODEV.  Is
apcupsd doing something wrong or is 2.5.68 doing something wrong?

~# dmesg
hub 1-0:0: debounce: port 1: delay 100ms stable 4 status 0x301
hub 1-0:0: new USB device on port 1, assigned address 4
usb 1-1: new device strings: Mfr=3, Product=1, SerialNumber=2
usb 1-1: Product: Back-UPS ES 350 FW:800.e3.D USB FW:e3
usb 1-1: Manufacturer: APC
usb 1-1: SerialNumber: AB0238241677
usb 1-1: usb_new_device - registering interface 1-1:0
hid 1-1:0: usb_device_probe
hid 1-1:0: usb_device_probe - got id
drivers/usb/core/file.c: asking for 1 minors, starting at 96
drivers/usb/core/file.c: found a minor chunk free, starting at 96
hiddev96: USB HID v1.10 Device [APC Back-UPS ES 350 FW:800.e3.D USB
FW:e3] on usb-00:07.2-1

~# ls -l /dev/usb/hid
total 0
crw-r--r--    1 root     root     180, 192 Dec 31  1969 hiddev96
crw-r--r--    1 root     root     180, 193 Dec 31  1969 hiddev97

~# strace -f apcupsd (trimmed)
[...]
open("/dev/usb/hid/hiddev95", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/dev/usb/hid/hiddev96", O_RDONLY) = -1 ENODEV (No such device)
open("/dev/usb/hid/hiddev97", O_RDONLY) = -1 ENODEV (No such device)
open("/dev/usb/hid/hiddev98", O_RDONLY) = -1 ENOENT (No such file or
directory)
write(2, "Couldn\'t find UPS device or no p"..., 43Couldn't find UPS
device or no permission.
) = 43
_exit(1)                                = ?

ref: http://www.sibbald.com/apcupsd/manual/usb.html
apcupsd version: 3.10.5
Linux kernel: 2.5.68

David
p.s. apcupsd needs patched to handle hiddev from 96 on (minor allocated by kernel)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Data Format Error

3. UPS Woes (APC Back-UPS Pro)

4. Help: linux on Hitachi Visionbook Pro 7630

5. APC Back-UPS 400, updated howto for UPS?

6. Limiting Access in Openwindows

7. Shape Ups,Men's Shape Ups,Men's Skechers Shape Ups - new styles!

8. Where is Smail RPM?

9. Tape drive for back-ups, RH 5.1

10. apcupsd and Back-Ups 500

11. powerd with APC Back-UPS Pro?

12. APC Back-UPS 400 and its UNIX cable

13. APC back ups on a linux box