[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Backup home directory



On Tuesday 02 November 2010 08:30:11 Camaleón wrote:
> On Tue, 02 Nov 2010 13:15:50 +0100, Alex PADOLY wrote:
> > Do you know a method to do a compressed image of home directory. I
> > prefer a GNU method.
> 
> My one-liner to make a full backup:
> 
> ***
> tar -cvjf /data/backup/sm01/$(date '+%F').tar.bz2 /home/sm01
> --exclude=.local/share/Trash --exclude=.thumbnails ***
> 
> That will create a (big) file under "/data/backup/sm01/2010-11-02.tar.bz2"
> of the whole "/home/sm01" minus the Trash folder and Thumbnails image
> cache.
> 
> Not an ISO image though, just a plain ".tar.bz2"
> 

I do something similar, except using the -X option and a file listing the 
directories to exclude (since there are several):

tar -cjf /backup/judd.`date +%Y%m%d`.tbz2 -X .tar_exclude .[0-z]* *

-Chris

------------------------------------------------------------------------
|   Christopher Judd, Ph. D.                                           |
|   Research Scientist III                                             |
|   NYS Dept. of Health                           judd@wadsworth.org   | 
|   Wadsworth Center - ESP                                             |
|   P. O. Box 509                                    518 486-7829      |
|   Albany, NY 12201-0509                                              |
------------------------------------------------------------------------


IMPORTANT NOTICE: This e-mail and any attachments may contain
confidential or sensitive information which is, or may be, legally
privileged or otherwise protected by law from further disclosure.  It
is intended only for the addressee.  If you received this in error or
from someone who was not authorized to send it to you, please do not
distribute, copy or use it or any attachments.  Please notify the
sender immediately by reply e-mail and delete this from your
system. Thank you for your cooperation.



Reply to: