Wednesday, January 26, 2011

Linux way of selctive backups

Sometimes we have a choice of only backing up some of the selected files from an
application or some other very crucial files. Below is how I do it in a real quick way:

cat >> /etc/bkup.conf

Then I run tar command with -T flag pointing to the file which contains
the list. In my case it is /etc/bkup.conf

tar -cjf bkup-WebConfig-`date +%Y-%m-%d`.tar.bz2 -T /etc/bkup.conf

And you have your selective backup ready!


No comments:

Post a Comment

8c tips for Freshers / NCG's

I have been having a great company with some of the very talented NCG’s ( New College Hires/ Grads ) last ~2yrs.  I work for Intuit I...