BACKUP-BY-INODE OF ENTIRE SYSTEM WITH SINGLE

ITEM: RTA000032478



QUESTION:                                                                       
If I do a level 0 backup of the / directory, will the backup                    
command only backup the root filesystem and none of the other                   
filesystems mounted underneath? If so, then how can I do a                      
level 0 (by i-node) backup without having to specify every filesystem           
in my system? If not, then since backup-by-inode will also backup               
unmounted filesystems, how do I control it to backup only the                   
mounted filesystems? I know I can always do a backup-by-name, but               
if I want to do a level 4 backup of the entire system, how can I                
do it without having to specify each individual filesystem?                     
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
A: Unfortunately, there is no simple AIX command that can do this.              
   However, through the use of several piped commands, it is possible to        
   do incremental backups by inodes of all mounted directories.                
                                                                                
   The command to use is:                                                       
                                                                                
   mount | grep jfs | cut -c27- | cut -d" " -f1 | \                             
   xargs -i backup -# -u -f /dev/rmt0.1 {}                                      
                                                                                
   where the -# is the incremental level you would like, and the                
   backslash (\) denotes that the command extends to the next line (but         
   may be typed as one line, without the backslash).                            
                                                                                
   Some characters might not translate well on some systems, so here is a       
   brief key:                                                                   
                                                                                
   pipe symbol:  |     left and right braces:  {}                               
                                                                               
   This command will first list all mounted filesystems, and then select        
   only the jfs filesystems.  From there, the 27th to the last character        
   is cut out, and from that, the first field (with a space acting as the       
   field delimiter) is selected.  This gives you a list of all currently        
   mounted filesystems.  However, there is an assumption made here that         
   there are no logical volume names that exceed 16 characters.  You can        
   verify that this command will work by typing it in up to (but not            
   including) the xargs command.  If the output consists of only jfs            
   filesystems, then the command as listed will work.  The xargs command        
   will take the list of filesystems, and do an incremental backup of all       
   of them.  Since the xargs command will execute the backup command            
   once per filesystem, the "rmt0.1" device is needed to specify that the       
   tape will not rewind after each backup.                                      
                                                                                
   You could easily turn this command into a shell script and replace the      
   "-#" flag from the backup command to "-$1".  This would allow you to         
   specify the incremental level as the first argument to the shell             
   script.                                                                      
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
                                                                                
                                                                                
This item was created from library item Q633488      CHHHN                      
                                                                                
Additional search words:                                                        
BACKUP CHHHN CMD COMMAND ENTIRE FILESYSTEMS GET INODE IX JUN93                  
MANAGEMENT NON OP POSSIBLE RISCMGMT RISCSYSTEM SINGLE SOFTWARE SYS              
SYSTEM UNMOUNTED                                                                
                                                                                
                                                                               


WWQA: ITEM: RTA000032478 ITEM: RTA000032478
Dated: 03/1996 Category: RISCMGMT
This HTML file was generated 99/06/24~12:43:12
Comments or suggestions? Contact us