Q. I would like to Backup all directories in /home to /dev/st0 tape drive. How do I use script to automate task and what commands do I need to use?
A. Use tar command to backup /home directory. The GNU version of the tar archiving utility included with all Linux distributions. Following tar command also works with Solaris/HP-UX UNIX and FreeBSD/*BSD oses.
For example tar command to backup /home should be as follows:
# tar -czf /dev/st0 /home
Where,
- /dev/st0 : Linux SCSI Tape device name
- /home : Home directory name
This will also backup hidden files and directories. Since this topic is already covered, please refer scripts and previous posts:
- Linux tape backup with mt and tar command - howto
- Howto: Use tar command through network over ssh session
- Shell script to backup directories & files from your home directory and email them as .tar.gz file
- Backup shell script to backup selected directories and upload securely (gpg) to FTP server
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 3 comments… read them below or add one }
This site is extremely helpful in learning scsi tape backup in Linux. I wish you good luck and thank you all for the help.
This site helped me lots. thanks for all this brilliant effort.
i had tried to take backup of whole system , backup has started but there is not any messages apperas after finishing the backup after taking servral hours