Re: Few more questions
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 26 Apr 2001 16:12:15 nikolai.hlubek@mailbox.tu-dresden.de wrote:
>
> 5.) I have a Cd-RW and want to use it for backups.
> What is the recommended way?
i've been doing this for years, and it works great. here's my script:
#!/bin/sh
#
# clean up from prior run
rm -rf /bkup
cd /bkup
#
# tar important directories - edited for brevity but you
# get the idea
tar -cpZ -f etc.tar.gz /etc/
tar -cpZ -f home.tar.gz /home/
tar -cpZ -f usr.tar.gz /usr/
#
# dump and tar mysql databases
/usr/local/mysql/bin/mysqldump -c -uSYS mozart > mozart.sql
tar -cpZ -f mozart.sql.tar.gz mozart.sql
/usr/local/mysql/bin/mysqldump -c -uSYS kbase > kbase.sql
tar -cpZ -f kbase.sql.tar.gz kbase.sql
# clean up dump files
rm -rf mozart.sql
rm -rf kbase.sql
#
# make iso9660 of all files
mkisofs -o /bkup/backup /bkup/
#
# write to cd-rw
/usr/bin/cdrecord/cdrecord -v blank=fast speed=4 dev=0,4,0 \
-data /bkup/backup
this creates my cdrw, and leaves the .tar.gz files in /bkup. i have
another job that runs during the night and transfers (via scp2) the
.tar.gz files to an offsite computer (which is, for the most part,
configured just like my server -- if i needed to, i could retrieve the
offsite server, plug it into my network, and i'm back in the game). both
the transfer job and the script above are set up in cron. and yes, the
scp2 job (which kicks off around 1:00am) runs throughout the night,
normally ending around 7:00am.
basically, this set up leaves me with 3 backups. one cdrw, one offsite
and one in the /bkup directory (which is handy if i only need to recover a
few files).
works like a charm.
- --
steve
*****
linux : http://exitwound.org
mozart: http://mozart.sourceforge.net
buck : http://www.BuckOwensFan.com
*****
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE66C9IpoyYujFtnVMRAsI/AKCGc140J51XAfBOq2RNLgWiuN6PuQCfZk+n
SHOdtLYhOEIeRDQNskk0Iw4=
=FQeB
-----END PGP SIGNATURE-----
Reply to: