Backup Home Directories in Linux

by Vivek Gite · 3 comments

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,

  1. /dev/st0 : Linux SCSI Tape device name
  2. /home : Home directory name

This will also backup hidden files and directories. Since this topic is already covered, please refer scripts and previous posts:

Featured Articles:

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 3 comments… read them below or add one }

1 Partha Chakraborty 01.08.08 at 7:08 am

This site is extremely helpful in learning scsi tape backup in Linux. I wish you good luck and thank you all for the help.

2 Imran Said 11.12.08 at 8:03 am

This site helped me lots. thanks for all this brilliant effort.

3 sumit 10.08.09 at 6:42 am

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

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous FAQ:

Next FAQ:

nixCraft FAQ PDF Collection Now Available To All