|
|
Backup selected files only - Linux
|
Views : 306
|
|
Tagged in : Linux
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Backup selected files only
Want to use tar to backup only certain files in a directory? First, create a file with the file you want to backup:
cat >> /etc/backup.conf
# /etc/passwd
# /etc/shadow
# /etc/yp.conf
# /etc/sysctl.conf
EOF
Then run tar with the -T flag pointing to the file just created:
tar -cjf bck-etc-'date +%Y-%m-%d'.tar.bz2 -T /etc/backup.conf
Now you have your backup.
|
|
By Sanju, On - 2010-01-29 |
|
|
|