Re: database backup
От | tony |
---|---|
Тема | Re: database backup |
Дата | |
Msg-id | 1026115106.2297.12.camel@vaio обсуждение исходный текст |
Ответ на | Re: database backup (Josh Jore <josh@greentechnologist.org>) |
Список | pgsql-general |
On Sun, 2002-07-07 at 12:39, Josh Jore wrote: > Oh heck yeah. So here's a script for you (I wrote it mostly in the mail > client so you have to do your own testing). Now schedule that in cron via > a line like: Thanks Josh. Inspiring myself from that I split the task into three cron jobs and am using mutt rather than perl. #!/bin/sh SENDTO=tony@animaproductions.com SUBJECT="Base de données - sauvegarde" ATTFILE=f3c.out.bz2 TXTFILE="daily backup of your database" # bzip it and mail it cd /my/directory/path bzip2 -9 f3c.out mutt -a $ATTFILE -s "$SUBJECT" $SENDTO < $TXTFILE I dump the database to f3c.out every day just after the end of the working day, I mail it later and then I delete the dump the next day before dumping again. This way I can get the dump file myself if I need to by scp (I really don't need a copy myself). The versioning of the database backup and getting it on a CD from time to time is left to the client. http://www3.primushost.com/~kylet/unix-att.html Has all sorts of scripts for attaching stuff to e-mail Thanks again Cheers Tony -- RedHat Linux on Sony Vaio C1XD/S http://www.animaproductions.com/linux2.html Macromedia UltraDev with PostgreSQL http://www.animaproductions.com/ultra.html
В списке pgsql-general по дате отправления: