
tar -czpf mystuff.tar.gz /home/acme-inc/
cp mystuff.tar.gz /var/www/
wget http://hal9000/mystuff.tar.gz
#!/bin/sh
chmod u+x backup_script
crontab -e
* 4 * * * /where/it/is/backup_script
#!/bin/sh
#!/usr/bin/expect -f
ls -a1 > backmeup
-a1options will do two important things. The
-awill get the "dot" files - those that begin with (.) and the
-1will make sure that the list turns out as a nice single column. It's easier to edit this way. Now, just go into the file and decide what you want and don't want to back up. If you're backing up, let's say, /home/steve/ then you will need to edit this file should you create any new files or directories in /home/steve/. If you create anything in already existing subdirectories, you don't need to worry. To make your tarball, just type the following.
tar -zcvpf my_backup.tar.gz `cat backmeup`The program 'cat' feeds the contents of the file backmeup into the tar program and creates the tarball based on its contents.
tar -cvzf acme-complete.tar.gz /home/acme/ > /home/admin/YYMMDD.complete.log
find /home/homedir -mtime -1 -print | tar -cvzf acme_complete.tar.gz -T - > YYMMDD.bkup.log
#!/bin/sh
mkisofs -o acme_bkup.iso -R -v /home/acme/
cdrecord -v speed=2 dev=2,0 acme_bkup.iso
cdrecord -scanbus