Re: Backup Restoration Procedure

From: Roberto Zini (r.zini_removeme__at_strhold.it)
Date: 07/09/03


Date: Wed, 09 Jul 2003 09:21:32 +0200

DMG FirstNet wrote:
> Thanks for the reply; answers / questions below.
>
> Roberto Zini <r.zini_removeme_@strhold.it> wrote in message
> news:3F0A7DAE.9080700@strhold.it...
>
>>Martin Roclawski wrote:
>>
>>>Currently have SCO Enterprise 5.0.6 running with some production
>>>software installed.
>>>The company who installed the server created a System menu which
>>>allowed the backup of the system with the following script.
>>>
>>>tape rewind
>>>/usr/lib/sysadmin/cbackup 0 15000 /dev/nrStp0 /dev/boot
>>>/usr/lib/sysadmin/cbackup 0 1999000 /dev/nrStp0 /dev/root
>>>/usr/lib/sysadmin/cbackup 0 6200000 /dev/nrStp0 /dev/u
>>>tape rewind
>>>
>>>Can anyone tell me how to restore a tape created using this.
>>>(Step by step instructions would be good as I have tried a number of
>>>ways with very little success.)
>>
>>Well, if memory serves, cbackup produces a CPIO archive with a leading
>>dot (eg, ./usr/fred) and offers the ability to create differential (or
>>incremental) backups of files changed since last backup.
>>
>>I think a quick "cpio -itv < /dev/nrStp0" will tell.
>>
>>Concerning the restore procedure, it's simply a matter of using cpio
>>with the "-i" (and others) flag.
>

Before proceeding with your message, might I suggest you the adoption of
a commercial backup software such as LoneTar or BackupEdge ? Both of 'em
provide superior backup and restore capabilities which help you out when
dealing with missing/lost files and system crash (not to mention that
they are a lot FASTER than their tar/cpio counterparts).

Dunno about LoneTar (www.cactus.com) but BackupEdge comes with a 60 days
evaluation period which allows you to fully taste its potential.

>
> Have tried that but am unsure if the flags I am using are the correct ones
> to extract a CPIO created by cbackup?
> The command I used was "cpio -ivf -I </dev/rct0". This was before I
> stummbled across the script above and now appreciate I should have used the
> nrStp0 to prevent rewind.
>
>
>>I'd be interesting to know the tests you're unsuccessfully performed
>>though ...
>
>
> After numerous attempts to extract the archive I finally got the follow to
> work, or should I say what I thought was working.
> Booted from a boot and root floppy set.
> then entered the following commands as root.
> mount /dev/hd0root /mnt
> cd /mnt
> cpio -ivf -I </dev/rct0
>
> This appeared to get a full file system. However if i tried to add a modem
> or network card the relink fell over.
> Also when we tried to restore some more recent data, using a 3rd party's
> software, the file permissions were all wrong. (Not sure this is linked to
> the same problem but it seems coincidental).
>

Well, I don't think cpio will be able to create directories without the
"-d" flag; what if you restore a directory which contains other subfolders ?

If I were you, I'd experiment with the following syntax:

        cd /mnt
        cpio -idvku < /dev/rStp0

Also, before proceeding with the restore, PLEAEE have a look at the
archive with the "cpio -itv < /dev/rStp0" command. You might be required
to specify a pattern which tells CPIO the files to restore. Eg:

        cd /usr
        cpio -idvku < /dev/rStp0 "fred/mydata/*"

>
>>Apropos, I noticed you're using /dev/nrStp0; is that intentional ? I
>>know that you can store several CPIO/TAPE archives on a single tape
>>using the no-rewind interface but what if a tape gets damaged ? Are you
>>willing to take such a risk ?
>>
>
>
> I believe it is intentional as the one tape then has the three file systems
> which would allow a full restore.

OK, but if you store all the above filesystems on a single tape and that
tape plays up, then your entire backup will be pretty useless !

Also, don't forget to verify the archive once it's been written to the
tape device; I've witnessed several customers who, after carefully
performing regular backups, ended up having to perform a complete OS
reinstall since the data couldn't get extracted from the data (I/O error).

Again, commercial thirdy part backup software will do that for you ...

> I think that I should be restoring the second two file systems also.
> If so, how do a mount the boot file system and the u filesystem to allow me
> to restore the additional two archives? or am I missing the point??

 From where ? The emergency floppies ?

The boot filesystem is available via the /dev/boot device so a simple

        mount /dev/boot /mnt/stand

will suffice.

As an example, if you want to restore a complete OS5 system from the
boot floppies:

. check with fdisk & divvy that partitions & filesystems are OK
. mount /dev/hd0root /mnt/
. mount /dev/boot /mnt/stand
. if you have additional filesystems (eg, /dev/u) mount 'em as well (eg,
mount /dev/u /mnt/u)
. cd /mnt
. cpio -ivBcdum < /dev/rStp0

Mind you that the last step assumes you have backed up your data with the

        find . -print | cpio -ovBcdum > /dev/rStp0

command.

Once you're done, umount the filesystems, check 'em with "fsck" and if
you want to make the disk bootable, give the following commands:

. /bin/dparam -w
. /bin/dd if=/etc/hdboot0 of=/dev/hd0a
. /bin/dd if=/etc/hdboot1 of=/dev/hd0a bs=1k seek=1

Reboot the system and you'll be fine.

>
>
>>>Also can someone tell me what switches the cbackup uses when placing
>>>the cpio command into the crontab? I may be able to use this info to
>>>back track and create a resoration procedure. I am a bit of a newbie
>>>to unix so the simpler the better.
>>
>>Try with "crontab -l" executed as user "root".
>
>
> Will try this next time I am on the system.
>
>

Hope this helps !

Best,
Rob

-- 
---------------------------------------------------------------------
Roberto Zini                             email : r.zini<AT>strhold.it
Technical Support Manager -- Strhold Evolution Division  R.E. (ITALY)
---------------------------------------------------------------------
"Has anybody around here seen an aircraft carrier?"
         (Pete "Maverick" Mitchell - Top Gun)


Relevant Pages

  • Re: How to clean install XP Home with Acronis True image 11
    ... The acronis help file is ... Primary - if you are going to restore a system partition, ... backup towards the internal secondary D drive, that's why I said the D ... were storing the backup files (archives) on the internal HDD that you were ...
    (microsoft.public.windowsxp.general)
  • Re: Errors on Duplicate for stanby
    ... This means that your restore and recovery have succeeded but that you ... ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION; ... The primary database should start sending in the archives and resolve any ... media recovery because of missing log RMAN-06025: no backup of log ...
    (comp.databases.oracle.server)
  • Re: Disk vs Tape scenario
    ... Once that is done you have your backup. ... Faster tape drives ... Then I can dump the volumes - but what about restore? ... Search the archives at http://bama.ua.edu/archives/ibm-main.html ...
    (bit.listserv.ibm-main)
  • Re: Unicode support in Command prompt
    ... Where can I get the source code for this program??? ... then how would you restore the directory to the current status from the ... It is better in this case to create a backup archive file ... > To restore from such backup archives first restore the full backup: ...
    (microsoft.public.win2000.file_system)
  • Re: Linux Backup Administration
    ... Gnutar and star provide extensions to the original tar (which did ... > relative pros and cons of cpio style vs. tar style backup? ... goal is to be able to restore an exactly identical system as fast ... The most likely reason to need the backup is that someone accidentally ...
    (Fedora)