LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   AIX (https://www.linuxquestions.org/questions/aix-43/)
-   -   Aix 4.1 System Backup Problem (https://www.linuxquestions.org/questions/aix-43/aix-4-1-system-backup-problem-4175474274/)

JimmyBobAvi 08-22-2013 07:54 AM

Aix 4.1 System Backup Problem
 
When trying to restore a system backup using "tar" From an RS\6000 to another system with same profile and model I get "READ ERROR MEDia error asuming zeros...update (81). Ive tried different tapes and chaged block szize to (0) or (512). The machine do restore well daily backups. I suspect the host machine has the problem in the system backup proccess.I have not tried to restore the system backup in the host machine do to the fact that it may corrupt the original system.??

MensaWater 08-22-2013 08:28 AM

Try doing a tar tvf <tape_device> on the original system. That just list the contents of the tape without restoring anything. If it works there but not elsewhere then it could have something to do with the head(s) being out of whack on the original system's drive.

It wasn't clear from what you wrote when you say your daily backups do restore if you meant they restore to the same system or to other systems. If the latter then your issue is probably the backup itself rather than the tape or tape drive. For example if you're doing some sort of DB backup and using a 3rd party tool to feed to the backup it could be the data on the tape isn't purely tar. (NetBackup for example uses a modified version GNU tar but has add-ons to allow it to work with things such as Oracle RMAN or MS-SQL or MS-Hyper-V or any Windows backup).

What exact command stream do you use to do the daily backup and the one you're having problems with.

What command stream are you using to do the restores?

linosaurusroot 08-22-2013 08:30 AM

I'd go for cleaning the tape drives and trying again with a fresh tape. Or even changing from tape to external disk which is way cheaper now than it used to be.

AIX 4.1 is very old. I discovered a lot of ways to get root on it during 1998/1999.

JimmyBobAvi 08-22-2013 09:36 AM

The daily backup restores well on the client machine.
The system backup is made with "Pro IV aplication menu commands and I have tried to restore it on the client machine at the c: promt with tar -cvf/dev/rmt0 and tar -xvf/dev/rmt0 and througth aplication menus, also using smit management tools.I dont want to really try any system or daily back tape on the host machine becaaus it is our server and do not really want to take any chances of corrupting it. I will investigate on the pro IV menu command and also go for changing the tape drive on the host machine even though the leds are fine. the tar tvf(device) on the client machine and no response but thank to you all for the attention recieved. I will post any other event in this situation soon.

thank you

MensaWater 08-23-2013 02:13 PM

tar cvf <dev> is used to WRITE to the device (you can also write to a file rather than a device).
tar xvf <dev> is used to READ from the device and WRITE to the target.
tar tvf <dev> is used to READ from the device and show what it contains without writing it to anything.

My suspicion is your application is NOT just doing a standard tar which is why you can't read it. What you COULD do is use tar to write the tape directly.

For example if the files you want to backup are in /mydir/mysubdir and your device is rmt0 as you indicate you could run:
tar cvf /dev/rmt0 /mydir/mysubdir
Notice that the device (or file) you are creating the archive on always follows the f option directly.

JimmyBobAvi 08-23-2013 02:28 PM

I usually use to restore a system backup by pressing 1 on the keyboard and selecting first boot device and console. Only system backups from 3 months ago are working. Also de an
# ls -l/dev/rmt0 on clone tape divice with last weeks system backup tape and got back
crw-rw-rw- 1 root system ...date...,so this means that the tape has the host system info. also tried today to boot to system tape with drive rmt0 blocks = 0 and the boot continued in varios atemps to the clone local boot process. Put back to 512 blocks since the host machine is also 512. Still have same problem.

jpollard 08-23-2013 06:10 PM

An "ls -l /dev/rmt0" only gives you the characteristics of device inode. It says nothing about what is on the tape, or even if a tape is loaded.

JimmyBobAvi 08-28-2013 07:23 AM

Thank you Mensawater and jpollard for the info. I am going to verify tape drives and also try to restore the Syst Backup on a third machine ..

Michael AM 09-06-2013 10:39 AM

a system backup is usually either a mksysb image, or a savevg image. neither of these are tar formatted, but so-called bff (backup file format).

an easy to test a tape is to use the command

# tcopy /dev/rmt0

giving only a single argument will only read the tape and report the sizes of the data blocks on the tape.

# chdev -l rmt0 -a block_size=0

will permit the drive to read much larger sizes.

# tctl status

is an easy to see the current status and configuration of a tape drive.

Hope this helps.

JimmyBobAvi 09-06-2013 01:10 PM

The backup is mksysb, I have pin down the problem on the host RS/6000. I did the tcopy /dev.. on a recent sys backup and the mesage was short ""tape file 1 record 1 size 10240 end of tape reached. The same coomand on an older funtioning sys backup gave me a much longer result."" tape file 1, tape file 2, tape file 3 record 1 record 2 etc....

JimmyBobAvi 09-06-2013 01:15 PM

Even though no errors on tape drive diagnostics. I am recieving a refurbished one on monday and will replace it. If problem not solve will have to deal with corrupted programming or disk and will investigate it to solve or maybe even have to replace hard disk and restore with old sys backup and new data and prov4 aplication.???

Michael AM 09-07-2013 03:39 AM

The one with 4 sections is a correctly made mksysb tape. I shall not bother with the details (that date back to AIX 3).
Basically, the first tape section is to boot the system (kernel, device drivers), the second is information to recreate rootvg (./image.data; ./bosinst.data and ./tapeblksz).
the third section is empty that used to be a TOC (table of contents) when backup was done by inode; and the fourth is the largest - the actual files - and are written in table blocks of tapeblksz)

to list the information on a mksysb tape:

* simple way:

Code:

listvgbackup Command

Purpose

      Lists or restores the contents of a volume group backup on a specified
      media.

Syntax

      listvgbackup [ -b blocks ] [ -f device ] [ -a ] [ -c ] [ -l ] [ -n ] [
      -r ] [ -s ] [ -d path ] [ -B ] [ -D ] [ -L ] [ -V ] [ file_list ]

Description

      The listvgbackup command lists the contents of a volume group backup
      from tape, file, CD-ROM, or other source and can be used to restore
      files from a valid backup source. The listvgbackup command also works
      for multi-volume backups such as multiple CDs, DVDs, USB disks, or
      tapes.

      The listvgbackup -r and restorevgfiles commands perform identical
      operations and should be considered interchangeable.

The complex way is:
Quote:

# mkdir -p /some/where/not/root
# chdev -l rmt0 -a block_size=512
# tctl -f /dev/rmt0 rewind
# restore -s2 -xqvf /dev/rmt0.1 ./tapeblksz
# cat tapeblksz
1024
# chdev -l rmt0 -a block_size=`cat tapeblksz`
# tctl -f /dev/rmt0 rewind
# restore -s3 -xqvf /dev/rmt0.1
Or something close - you could test/list what is on the tape using
Code:

# tctl -f /dev/rmt0 rewind
# restore -s3 -Tqvf /dev/rmt0.1


JimmyBobAvi 09-25-2013 08:12 AM

Hello everybody, I'm back. Due to a service contract with IBM, They came and tried to change the tape drive on the RS 6000 machine. Both atemps failed due to the fact that there refurbuished parts were in worst shape then the original one. At one time the machine would not boot due to an inproper soci cable atachment. So I scared away from there service. Due to the info given to me by this forum I kind of pin pointed the malfuntion at the host file or aplication software. It stops reading files after a specific data file called BA 701 .idx. So after the software loops awhile trying to read it then aborts. I will take a chance soon and run a verify Proiv files or ischk *.. I havent done it because if the hdisk is in bad shape I may get a freeze. so I am planning the operation for an apropiate period.

JimmyBobAvi 09-25-2013 09:30 AM

To be more precise the restoration of a system backup on my clone machine using Aix 4.3 and using using mksysb hangs up on the forth level when recovering data of volume group. The image.data , bosinst.data files and TOC seem to read fine.

Michael AM 09-26-2013 03:01 PM

I can highly recommend a refurbished supplier, however I do not know the policy here for posting names and/or web-sites. I'll send a PM with an email address.

Correction, I cannot find a way to send a PM.

If you google my name and AIX and/or rootvg you should find my portal and I can supply the site there (or Jermey/a moderator says it is okay to post commercial sites).

regards,

p.s. - try to do the following commands to retension your tape:

# tctl fsf (repeat 4 times, the first three will be very fast)
# tctl rewind

Note: the command "# tctl retension" never worked for me with the 2 and 4 GByte drives. That is why I suggest you fsf (File Seek Forward) to end of tape, and then rewind.

Then also try the command

# listvgbackup

To list the contents - to verify the tape is readable.


All times are GMT -5. The time now is 12:55 PM.