What is the best way to create a tarball?
I have a few directories that i would like to back up and i hear that a tarball is the best way to do it.
Thanks
# cd /home
# tar -cvzf /backup/userbackup.tgz fred mary
$ tar -tvzf /backup/userbackup.tgz


#!/bin/sh
# Change into the directory where the backup files are stored:
cd /workspace
# Keep a history of 4 backups:
rm -f bkupweb.tgz.3
mv -f bkupweb.tgz.2 bkupweb.tgz.3
mv -f bkupweb.tgz.1 bkupweb.tgz.2
mv -f bkupweb.tgz bkupweb.tgz.1
# Back up important stuff
cd /
/bin/tar -cvzf /workspace/bkupweb.tgz etc/mrtg etc/httpd/conf home/voidmain var/www/error var/www/html var/www/voidmain
0 4 * * * /root/bin/bkupweb > /workspace/bkupweb.log 2>&1

tar -cvjf whatever
tar -xvjf whatever




Users browsing this forum: No registered users and 3 guests