Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to do remote backup on sco

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hi everyone:

I'm new to unix, and I have been give a task to backup 4 sco machines; however, thereis only
one tape drive for four sco machines. can someone walk me through step by step
to do a remote backup?
Thanks.

Wayne
 
The easiest way to do a remote backup is to use one of the Supertars:
This *can* be done simply by piping tar/cpio to a remote shell if you have properly setup user equivalency. I really, really, REALLY do not recommend this, but:


find / | cpio -ocdu | rcmd remote "dd of=/dev/rStp0"

is a typical response to this sort of question.



Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
An alternate you might want to investigate is to install the tape into an external box and move it from system to system. This assuming that it is the type that can be connected externally. Ed Fair
efair@atlnet.com

Any advice I give is my best judgement based on my interpretation of the facts you supply.

Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.

 
see sco ta :- 107232
or read this , it's SCO's take on it all.
This document addressed these questions.

TABLE OF CONTENTS

Section I.......................................................Introduction

Section II....................................................Setup/Caveats

Section III.........................................Backup/Restore Scenarios

A..................................Remote files to local tape drive
B.................................Local files to remote tape drive
C.................................Local files to remote disk drive

Section IV.........................................................Appendix


+----------------------------------------------------------------------------+

SECTION I - Introduction

The techniques presented here make use of the find, cpio, rcmd
and dd commands. Three scenarios will be discussed:

(A) Backing up remote system to a tape drive on the local system.

(B) Backing up local /dev/u filesystem to a remote system's tape drive.

(C) Backing up local filesystems to a remote system's hard drive.

The examples make the following assumptions (you can
provide your own names when doing the commands):

- the local system's machine name is "locsys"
- the remote system's machine name is "remsys"
- the device name for the tape drive is "/dev/rct0".

SECTION II - Setup / Caveats

This section presents setup guidelines and caveats when doing
remote backups.

(A) This document presents only the very basic foundational command
stream. In a production environment this would have to be enhanced
considerably with regards to error checking, validation, logging.

(B) rcmd(TC) requires setting up host and/or user equivalency with the
remote system. This involves setting up the proper entries in the
/etc/passwd, /etc/hosts.equiv and possibly $(HOME)/.rhosts files.
See the SCO TCP/IP manual pages for file formats and for more
information on setting up user equivalency.

(C) Note that rcmd(C) command must be run as root if you are backing
up whole filesystems. Otherwise, you will not have permissions
to read all the files. Root user equivalency requires setting
up a "/.rhosts" file.

(D) If the find(C) command's <pathnamelist> ends with an &quot;*&quot; or a &quot;./&quot;
or a &quot;.&quot;, then you need to be sure to be in the correct directory
when the backup cpio is executed. The alternative is to use absolute
pathnames, ie., ones that begin with a leading slash.

(E) The examples shown cross mount points. That is, a filesystem
that is mounted within the filesystem being backed up is also
backed up. If you wish to exclude mounted filesystems, include
the &quot;-mount&quot; option to the find command.

(F) The examples shown do not follow symbolic links. That is, the
examples back up the symbolic link itself, but not the contents
of the link, which may even be another entire filesystem. If you
want to follow the symbolic links to back up what they point to,
then include the &quot;-follow&quot; option in the find command.

(G) In general, it is good practice to include the &quot;-K&quot; option to cpio
to indicate the tape's capacity to facilitate multi-volume backups.
Unfortunately, since cpio interacts with the user through /dev/tty,
this will not work with rcmd. Therefore, it is not recommended that
backups be made to floppies as they are limited in size and there is
no easy way to load new disks as the backup continues. Small tape
sizes may be problematic as well. It is left up to the reader to
develop another method of accommodating multi-volume archives.

(H) The examples given use cpio as the archive utility. You may want
to use a different archive utility in place of cpio (be sure to make
any necessary changes to the scripts). One such utility is tar(C).
However, tar is not really recommended as it does not save information
about empty directories and special files. Tar also cannot handle
files whose pathnames contain more than 100 characters (cpio(C) can
handle file names less than or equal to 256 characters).

(I) Neither cpio(C) (nor tar(C) for that matter) deals sensibly with
sparse files. A sparse file will actually occupy more space on
the archive than it did in the original filesystem (and will cause
a lot of data to be passed along the net).

+----------------------------------------------------------------------+

SECTION III - Backup / Restore scenarios

(A) Backing up remote system to a tape drive on the local system.

This method describes administering backups from the system with
the tape drive, thus being able to mount/unmount the tapes.

__________
__________ | | __________
/ keyboard |____| locsys |_________ | |
|__________| |__________| /__________| remsys |
| |__________|
/ \ |
/ \ ___|___
( Tape) <==backup== ( remote)
\ / ( disk )
\_/_____ (_______)
archive source


The following is a suggested command stream syntax:

rcmd <remsys> &quot;cd <mntpt>; find . -depth -print | cpio -ocvB&quot; > /dev/rct0
| | | | |
| | | | output to local tape
| | | | device
| | | |
| | | put into cpio archive
| | |
| | \----- create list of files
| |
| \----- position to filesystem's mount point or subdirectory
|
\----- execute the following quoted command(s) on the remote system


(1) Backup Example

Here is an example of backing up the filesystems from remsys onto
the local system's tape drive. You can include a bs= option to
the dd command for improved performance. Note that in this example
the &quot;-mount&quot; was _not_ included so as to back up all of the mounted
filesystems.

# cd /
# umask 000
# rcmd remsys &quot;cd /
> find . -depth -print |
> cpio -ocvB&quot; > /dev/rct0


(2) Restore Example

__________
__________ | | __________
/ keyboard |____| locsys |_________ | |
|__________| |__________| /__________| remsys |
| |__________|
| |
/ \ |
/ \ ___|___
( Tape) ==restore==> ( remote)
\ / ( disk )
\_/_____ (_______)
archive target


Here is an example of restoring all of the remote system's files
from the local tape archive.

# cd /
# umask 000
# dd if=/dev/rct0 |
> rcmd remsys &quot;cd /
> cpio -icvBdum&quot; < /dev/rct0

(B) Backing up to remote tape drive
__________ _
__________ | | __________ / / keyboard |____| locsys |_________ | | / |__________| |__________| /__________| remsys |---( tape)
___|___ |__________| \ /
( local ) ==backup==> \_/___
( disk ) archive
(_______)
source

The following is a suggested command stream syntax:

find . -depth -print | cpio -ocvB | rcmd <remsys> &quot;dd of=<tapedev>&quot;
| | | |
| | | \-- put archive on tape
| | |
| | \----- send archive to remote mach
| |
| \----- create cpio archive (incl directory info and
| actual data)
|
\----- list all files in directory tree of current directory


(1) Backup Example

Here is an example of backing up the /dev/u filesystem from the
local system to the tape drive on remsys. It assumes there is a
directory named /backup to back up to. You can include a bs=
option to the dd command for improved performance.

# cd /u
# umask 000
# find . -depth -print |
> cpio -ocvB |
> rcmd remsys &quot;dd of=/dev/rct0 bs=32k&quot;

(2) Restore Example

__________ _
__________ | | __________ / / keyboard |____| locsys |_________ | | / |__________| |__________| /__________| remsys |---( tape)
___|___ |__________| \ /
( local ) <==restore== \_/___
( disk ) archive
(_______)
target

Here is an example of restoring the /u/dev filesystem on the local
system from the tape drive on remsys. You can include a bs= option
to the dd command for improved performance.

# cd /u
# umask 000
# rcmd <remsys> &quot;dd if=/dev/rct0 bs=32k&quot; |
> cpio -icvBdum

(C) Backing up local filesystem to a remote system's hard drive.
__________
__________ | | __________
/ keyboard |____| locsys |_________ | |
|__________| |__________| /__________| remsys |
___|___ |__________|
( local ) ___|___
( disk ) ==backup==> ( remote)
(_______) ( disk )
source (_______)
archive

The following is a suggested command stream syntax:

find . -depth -print | cpio -ocvB | rcmd <remsys> &quot;cd /tmp; cpio -icvBdum&quot;
| | | |
| | | &quot;de-archive&quot;-----/
| | |
| | \----- send this archive to remote mach
| |
| \----- create cpio archive (incl directory info and
| actual data)
|
\----- list all files in directory tree of current directory


(1) Backup Example

Here is an example of backing up the local system's root filesystem
to a subdirectory on remsys named &quot;backup&quot;. The -mount option is
included with the find command to specify to _not_ transverse any
mounted filesystems.

# cd /
# umask 000
# find . -depth -mount -print |
> cpio -ocvB |
> rcmd remsys &quot;cd /backup && cpio -icvBdum&quot;

(2) Restore Example
__________
__________ | | __________
/ keyboard |____| locsys |_________ | |
|__________| |__________| /__________| remsys |
___|___ |__________|
( local ) ___|___
( disk ) <==restore== ( remote)
(_______) ( disk )
target (_______)
archive

Here is an example of restoring the local system's root
filesystem from a subdirectory on remsys named &quot;backup&quot;.
The -mount option is included with the find command to
specify to _not_ transverse any mounted filesystems.

# cd /
# umask 000
# rcmd remsys &quot;cd /backup
> find . -depth -mount -print |
> cpio -ocvB&quot; |
> cpio -icvBdum

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top