Dave's Brain

Browse - computer tips - using tar for backup

Date: 2011apr17
OS: Linux

Q.  What's a good why to use tar for backup?

A.  You can do this:

	cd /var
	tar cvfjh www.tar.bzip2 www

This will backup all your websites into file www.tar.bzip2
(Assuming your websites are under /var/www)

Explanation of the options:

	c = create
	v = verbose
	f = into a file (instead of tape!)
	j = use bzip2 (which give you the best compression)
	h = follow symbolic links

Of course, there are other options but these are pretty nice.
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Advertisements: