![]() You will not only need space for the new /tmp volume, but also for a backup snap-shot volume, about 20% of the size of the /home volume. Iv) What would happen if the root partition (/) ran out of space?Įxamine the space available on your drive, both free space (if any) as well as volumes that are using only a small amount of their allocated space. Iii) What is the estimate of the total space required for your backups? However you will need to store one complete backup of /home and two backups of /etc. Note that compressed archives will take about 30% less space. To estimate the size of the backups, calculate the size of /home and /etc directories. Support the nixCraft with a PayPal donation or Patreon □ Was this helpful? Please add a comment to show your appreciation or feedback. Join the nixCraft community via RSS Feed or Email Newsletter. He wrote more than 7k+ posts and helped numerous readers to master IT topics. Vivek Gite is the founder of nixCraft, the oldest running blog about Linux and open source. This small how-to covered all options used in day today life however, it is highly recommended that you go through man pages of mt and tar command for more options/information.Download : Linux / UNIX Tar Full and Incremental Tape Backup Shell Script.writing to tape on a remote Linux server system) Howto – Use tar command through network over ssh session (i.e.Tue |Wed |Thu |Fri ) partial_backup * ) esac > $LOGFIILE 2 >& 1Ĭustomize above shell script as per your needs and setup a cron job to execute /path/to/tapebackup.sh See also: # Okay let us start backup procedure # If it is monday make a full backup # For Tue to Fri make a partial backup # Weekend no backups case $NOW in MKDIR= /bin / mkdir # - # Excluding files when using tar # Create a file called $EXCLUDE_CONF using a text editor # Add files matching patterns such as follows (regex allowed): # home/vivek/iso # home/vivek/*.cpp~ # - & TAR_ARGS= "-X $EXCLUDE_CONF" # Custom functions # Make a full backupįull_backup ( ) # Main logic # Make sure log dir exits & $MKDIR -p $LOGBASE # Verify dirs # Path to binaries TAR= /bin / tar MT= /bin /mt # Backup dirs do not prefix / BACKUP_ROOT_DIR= "home sales" # Get todays day like Mon, Tue and so on NOW=$ ( date + "%a" ) # Tape devie name TAPE= "/dev/st0" # Exclude file TAR_ARGS= "" EXCLUDE_CONF= /root /. # Last updated on : Feb-2007 - Added support for excluding files / dirs. # - # Last updated on : March-2003 - Added log file support. # - # Copyright (c) 1999 Vivek Gite # This script is licensed under GNU GPL version 2.0 or above # - # This script is part of nixCraft shell script collection (NSSC) # Visit for more information. # Script must run as root or configure permission via sudo. # The operator or sys admin can replace the tape every day after the script has done. ![]() # You can run script at midnight or early morning each day using cronjons. ![]() Label each tape as Mon, Tue, Wed, Thu and Fri. ![]() #!/bin/bash # A UNIX / Linux shell script to backup dirs to tape device like /dev/st0 (linux) # This script make both full and incremental backups. M : create/list/extract multi-volume archive (multiple tapes). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |