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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how Back up to a tape conected to another server

Status
Not open for further replies.

yordangs

ISP
Sep 7, 2001
91
MX
hello may be my question its obius or the thing that i want to do cold´nt make it,

Any one can tell me how i can make a back up of one server all the system files to a tape conected to another server salpme i have my tape conected to server 1, but i only have this tape device , and its coneccted to this server i want make a back up of other server in this case server2 using this tape the problem its i cant conect directly because i make th backups remotly how i can share the tape device and make the back up of the server2 using the tape conected to server1

how i can do this??

thanks a lot anyway
 

Creating an Archive to a Remote Device

About this document
Some UNIX systems have the capability of referencing a remote tape device as if it were local to the source system. Running AIX Systems cannot "mount" a remote tape device locally; however, data can be sent to a remote machine tape device using rsh.

This document describes how to archive files to a remote tape device. Information in this document is valid for AIX Versions 3.2.5 through 4.x.


IMPORTANT NOTE: The dd command will not span tapes. Multiple tape archives are not available via this procedure.


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

Tape blocksize
Decide on the appropriate tape device blocksize (bs). Recommended values are as follows:
9trk or 1/4in = 512
8mm or 4mm = 1024

To check the current blocksize of the tape device, enter:
tctl -f /dev/rmt0 status

To change the tape device blocksize, enter:
chdev -l rmt0 -a block_size=<bs>

Replace <bs> with the value that you want to assign.

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

Setting up the .rhosts file
In order to create a remote archive, the system being archived (the source machine) must have access to the system with the tape drive (the target machine). The target system can be accessed using any of the defined users on that system, but the following examples assume that both the local and remote user is root. For further information on rsh and user authentication, please see the rsh man page or InfoExplorer.

On the target machine
As root, using a favorite editor, create a file in the / (root) directory called .rhosts that allows the source system access to the target system.

To determine the name of the source machine to be added to the file, run the following command:
host <src_host_IP>

<src_host_IP> is the IP address of the source system.

Add the following line to the file:
<src_host_name> root

<src_host_name> is the system name determined in step 2.

Save the file.

Change the permissions on the .rhosts file by entering:
chmod 600 .rhosts

On the source machine
Once the .rhosts file is set up on the target system, test to be sure the source system has access. On the source system, as root, enter:
rsh <target_machine>

<target_machine> is the name of the target host. Shell access should be granted; no login prompt asking for a username should appear.

Type exit to log out.

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

Archive commands
The following are examples of how to use AIX archive commands to a remote tape drive. In these examples, <bs> represents the target tape device blocksize, <t_mach> is the name of the target system, and /dev/rmt0 is used as an example of the remote tape device. The <path> parameter is used where a directory or file name is needed. For more information, please see each archive command's man page or InfoExplorer.

Backup by name
To remotely create a backup archive by name, enter:
find <path> -print | backup -ivqf- | rsh <t_mach> &quot;dd of=/dev/rmt0 bs=<bs> conv=sync&quot;

To restore a backup archive by name created as in the preceding example, enter:
rsh <t_mach> &quot;dd if=/dev/rmt0 bs=<bs>&quot; | restore -xvqdf- <path>

Backup by inode
WARNING: The backup by inode documentation states that the source file system must be unmounted before archiving. Even though it might sometimes work without unmounting, such usage is not supported.

To remotely create a backup archive by inode, enter:
umount <filesystem>
backup -0 -uf- <filesystem> | rsh <t_mach> &quot;dd of=/dev/rmt0 bs=<bs> conv=sync&quot;

To restore a backup archive by inode created as in the preceding example, enter:
rsh <t_mach> &quot;dd if=/dev/rmt0 bs=<bs>&quot; | restore -xvqf- <path>

cpio
To remotely create an archive using cpio, enter:
find <path> -print | cpio -ovcB | rsh <t_mach> &quot;dd ibs=5120 obs=<bs> of=/dev/rmt0&quot;

To restore a cpio archive created as in the preceding example, enter:
rsh <t_mach> &quot;dd if=/dev/rmt0 ibs=<bs> obs=5120&quot; | cpio -icvdumB <path>

tar
To remotely create an archive using tar, enter:
tar -cvdf- <path> | rsh <t_mach> &quot;dd of=/dev/rmt0
bs=<bs> conv=sync&quot;

To restore a tar archive created as in the preceding example, enter:
rsh <t_mach> &quot;dd if=/dev/rmt0 bs=<bs>&quot; | tar -xvpf-
<path>

rdump
At AIX Version 4.2 and subsequent versions, rdump includes the -L flag. This flag specifies the length of the tape in bytes. For example, for a 2GB tape, use -L 2g.

At versions prior to AIX 4.2, rdump requires the use of the -s (tape length) and -d (density) flags for devices other than 9-track tape. Suggested values are:

Size/Type | Size used | -c option | -d flag | -s flag
------------- ----------- ----------- --------- ----------
1/4&quot; tape
----------------------------------------------------------
QIC-120 | 120 mb | yes | 1250 | 8800
QIC-150 | 150 mb | yes | 1250 | 10600
QIC-525 | 525 mb | yes | 2000 | 22000
QIC-1000 | 1.2 gb |
----------------------------------------------------------
8mm tape
----------------------------------------------------------
2.3gb | 2.2 gb | no | 1280 | 158596
5.0gb | 4.9 gb | no | 1280 | 353240
7.0gb | 6.9 gb | no | 1280 | 497420
----------------------------------------------------------
4mm tape
----------------------------------------------------------
2.0gb | 1.9 gb | no | 1280 | 136972
4.0gb | 3.9 gb | no | 1280 | 281152

To remotely create an rdump tape, enter:
rdump -0 -u -s<s_value> -d<d_value> -f <t_mach:/dev/rmt0> <filesystem>

To restore an rdump tape created as above, enter:
cd /<filesystem>
rrestore -rqvf <t_mach>:/dev/rmt0


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

Moving a file system remotely
One of the easiest methods of moving an entire file system across a network while preserving permissions, UIDs, and GIDs is to use the tar and rsh commands. By invoking a tar command on the local system that writes the created archive to STDOUT, and redirecting that archive output to STDIN of an extracting tar command running on the remote system, no temporary file is created.

From the source system, enter:

tar -cvf- <path> | rsh <t_mach> &quot;cd <path> tar -xvf-&quot;






[ TechDocs Ref: 90605195314802 Publish Date: Oct. 17, 2001 4FAX Ref: ]
 
yordangs,

maybe this will help you....Creating an Archive to a Remote Device

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

Contents
About this document
Tape blocksize
Setting up the .rhosts file
On the target machine
On the source machine
Archive commands
Backup by name
Backup by inode
cpio
tar
rdump
Moving a file system remotely

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

About this document
Some UNIX systems have the capability of referencing a remote tape device as if it were local to the source system. Running AIX Systems cannot &quot;mount&quot; a remote tape device locally; however, data can be sent to a remote machine tape device using rsh.

This document describes how to archive files to a remote tape device. Information in this document is valid for AIX Versions 3.2.5 through 4.x.


IMPORTANT NOTE: The dd command will not span tapes. Multiple tape archives are not available via this procedure.


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

Tape blocksize
Decide on the appropriate tape device blocksize (bs). Recommended values are as follows:
9trk or 1/4in = 512
8mm or 4mm = 1024

To check the current blocksize of the tape device, enter:
tctl -f /dev/rmt0 status

To change the tape device blocksize, enter:
chdev -l rmt0 -a block_size=<bs>

Replace <bs> with the value that you want to assign.

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

Setting up the .rhosts file
In order to create a remote archive, the system being archived (the source machine) must have access to the system with the tape drive (the target machine). The target system can be accessed using any of the defined users on that system, but the following examples assume that both the local and remote user is root. For further information on rsh and user authentication, please see the rsh man page or InfoExplorer.

On the target machine
As root, using a favorite editor, create a file in the / (root) directory called .rhosts that allows the source system access to the target system.

To determine the name of the source machine to be added to the file, run the following command:
host <src_host_IP>

<src_host_IP> is the IP address of the source system.

Add the following line to the file:
<src_host_name> root

<src_host_name> is the system name determined in step 2.

Save the file.

Change the permissions on the .rhosts file by entering:
chmod 600 .rhosts

On the source machine
Once the .rhosts file is set up on the target system, test to be sure the source system has access. On the source system, as root, enter:
rsh <target_machine>

<target_machine> is the name of the target host. Shell access should be granted; no login prompt asking for a username should appear.

Type exit to log out.

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

Archive commands
The following are examples of how to use AIX archive commands to a remote tape drive. In these examples, <bs> represents the target tape device blocksize, <t_mach> is the name of the target system, and /dev/rmt0 is used as an example of the remote tape device. The <path> parameter is used where a directory or file name is needed. For more information, please see each archive command's man page or InfoExplorer.

Backup by name
To remotely create a backup archive by name, enter:
find <path> -print | backup -ivqf- | rsh <t_mach> &quot;dd of=/dev/rmt0 bs=<bs> conv=sync&quot;

To restore a backup archive by name created as in the preceding example, enter:
rsh <t_mach> &quot;dd if=/dev/rmt0 bs=<bs>&quot; | restore -xvqdf- <path>

Backup by inode
WARNING: The backup by inode documentation states that the source file system must be unmounted before archiving. Even though it might sometimes work without unmounting, such usage is not supported.

To remotely create a backup archive by inode, enter:
umount <filesystem>
backup -0 -uf- <filesystem> | rsh <t_mach> &quot;dd of=/dev/rmt0 bs=<bs> conv=sync&quot;

To restore a backup archive by inode created as in the preceding example, enter:
rsh <t_mach> &quot;dd if=/dev/rmt0 bs=<bs>&quot; | restore -xvqf- <path>

cpio
To remotely create an archive using cpio, enter:
find <path> -print | cpio -ovcB | rsh <t_mach> &quot;dd ibs=5120 obs=<bs> of=/dev/rmt0&quot;

To restore a cpio archive created as in the preceding example, enter:
rsh <t_mach> &quot;dd if=/dev/rmt0 ibs=<bs> obs=5120&quot; | cpio -icvdumB <path>

tar
To remotely create an archive using tar, enter:
tar -cvdf- <path> | rsh <t_mach> &quot;dd of=/dev/rmt0
bs=<bs> conv=sync&quot;

To restore a tar archive created as in the preceding example, enter:
rsh <t_mach> &quot;dd if=/dev/rmt0 bs=<bs>&quot; | tar -xvpf-
<path>

rdump
At AIX Version 4.2 and subsequent versions, rdump includes the -L flag. This flag specifies the length of the tape in bytes. For example, for a 2GB tape, use -L 2g.

At versions prior to AIX 4.2, rdump requires the use of the -s (tape length) and -d (density) flags for devices other than 9-track tape. Suggested values are:

Size/Type | Size used | -c option | -d flag | -s flag
------------- ----------- ----------- --------- ----------
1/4&quot; tape
----------------------------------------------------------
QIC-120 | 120 mb | yes | 1250 | 8800
QIC-150 | 150 mb | yes | 1250 | 10600
QIC-525 | 525 mb | yes | 2000 | 22000
QIC-1000 | 1.2 gb |
----------------------------------------------------------
8mm tape
----------------------------------------------------------
2.3gb | 2.2 gb | no | 1280 | 158596
5.0gb | 4.9 gb | no | 1280 | 353240
7.0gb | 6.9 gb | no | 1280 | 497420
----------------------------------------------------------
4mm tape
----------------------------------------------------------
2.0gb | 1.9 gb | no | 1280 | 136972
4.0gb | 3.9 gb | no | 1280 | 281152

To remotely create an rdump tape, enter:
rdump -0 -u -s<s_value> -d<d_value> -f <t_mach:/dev/rmt0> <filesystem>

To restore an rdump tape created as above, enter:
cd /<filesystem>
rrestore -rqvf <t_mach>:/dev/rmt0


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

Moving a file system remotely
One of the easiest methods of moving an entire file system across a network while preserving permissions, UIDs, and GIDs is to use the tar and rsh commands. By invoking a tar command on the local system that writes the created archive to STDOUT, and redirecting that archive output to STDIN of an extracting tar command running on the remote system, no temporary file is created.

From the source system, enter:

tar -cvf- <path> | rsh <t_mach> &quot;cd <path> tar -xvf-&quot;



 
thnks alot im going to read about this to solve this problem thanks alot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top