Changes between Version 8 and Version 9 of Backing up Sun Directories


Ignore:
Timestamp:
04/13/06 15:57:28 (20 years ago)
Author:
cdelarcuz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Backing up Sun Directories

    v8 v9  
    77
    88 * Commands below to create tar files will not follow any links - just the
    9           link  file will be copied unless use the h switch. Also when extracting
    10 tar files, not all mode settings will be preserved unless
    11           use the p switch.
     9   link file will be copied unless use the h switch. Also when extracting
     10   tar files, not all mode settings will be preserved unless use the p switch.
    1211
    1312 * To put more than one tar file per tape, use device name /dev/rmt/0n(n=norewind)
    14           and also the 'mt'  command to position the tape past the last tar file written.
    15           See 'man mt'. and example (4) below.
     13   and also the 'mt'  command to position the tape past the last tar file written.
     14   See 'man mt'. and example (4) below.
    1615
    17 == 1 ==
     16=== Place all files and subdirectories found in my_directory on the tape and rewind the tape ===
    1817{{{
    1918> cd /home/my_directory
    2019> tar cvf /dev/rmt/0 .         
    21 (will put all files and subdirectories found
    22 in my_directory on the tape and rewind the tape)
    23 
     20}}}
     21=== Extract all files and subdirectories from the tar file on the tape and put them in the current directory ===
     22{{{
    2423> cd /home/my_directory/subdirectory
    2524> tar xvf /dev/rmt/0           
    26 (will extract all files and subdirectories
    27 from the tar file on the tape and put them in the current directory)
    2825}}}
    29 == 2 ==
     26=== Place directories usr and home and all subdirectories of usr and home on the tape and rewind the tape ===
    3027{{{
    3128> cd /
    3229> tar cvf /dev/rmt/0  usr  home       
    33 (will put directories usr and home and all subdirectories
    34 of usr and home on the tape and rewind the tape)
    35 
     30}}}
     31=== Extract directory home and all its subdirectories to the current directory ===
     32{{{
    3633> cd /tmp
    3734> tar xvf /dev/rmt/0    home           
    38 (will extract directory home and all its subdirectories to the current directory)
    3935}}}
    40 == 3 ==
    41 Not a good idea to make a tar file from data begining with '/', for instance:
     36=== Not a good idea to make a tar file from data begining with '/', for instance ===
    4237{{{     
    4338tar cvf /dev/rmt/0  /home/carmen/wilds 
     
    4843tar cvf /dev/rmt/0 .
    4944}}}
    50 == 4 ==
    51 To add data to a backup tape without overwriting its current contents:
     45=== To add data to a backup tape without overwriting its current contents ===
    5246{{{
    5347> mt -f /dev/rmt/0n eom         
    5448(will space out past the EOF mark)
     49}}}
     50=== Backup the current directory and all subdirectories below in compressed mode without rewinding first ===
     51{{{
     52> tar cvf /dev/rmt/0hn  . > /tmp/newbackup.log &
     53}}}
    5554
    56 > tar cvf /dev/rmt/0hn  . > /tmp/newbackup.log &
    57 (will backup the current directory and all subdirectories below in
    58 compressed mode without rewinding first)
    59 
    60 See also:
    61 
    62  Sample script to dump a file system to tape.
    63  
    64  Script below copies four file systems to the same tape.  A typical 8mm tape
    65  cartridge holds 5.0GB or 10GB in compressed mode. 
    66 
    67 
    68  Use command:    % ufsrestore -if /dev/rmt/0n
    69  to retrieve a file from a 'dump' tape later on.  The ufsrestore command is
    70  convenient to use, see manual pages.
    71 }}}
    72 {{{       
     55=== Sample script to dump a file system to tape ===
     56Script below copies four file systems to the same tape.  A typical 8mm tape
     57cartridge holds 5.0GB or 10GB in compressed mode. 
     58{{{
     59Use command:     % ufsrestore -if /dev/rmt/0n
     60to retrieve a file from a 'dump' tape later on.  The ufsrestore command is
     61convenient to use, see manual pages.
     62   
    7363#! /bin/csh
    7464#