[drupal-support] automatically do database backups?

Pontus Ullgren ullgren at users.sourceforge.net
Fri Apr 15 05:42:23 UTC 2005


A security tip is to put the username and password in a ini file and use
the --defaults-file commandline argument. That way nobody can find your
database root password using 'ps' the same time as the cron executes your
command.

Another thing I tried for a while was to mail myself a gziped and gpg
encrypted databasedump. You would have to use a gpg key without any
passphrase. The logic beeing that if you send the backup using ftp or just
plainmail it will go over hostile ground unprotected.
But then again this might be a bit OT =)


Thatguywhowon'tgivehisname said:
> Here's what I do:
>
>
> cd /home/www
> tar --totals -cpf /home/www/backups/www.domain.org.tar
>  www.domain.org
> mysqldump -u root -h localhost -p"password" drupal >
> /home/www/backups/drupal_dump.sql
> ftp -n </home> mail -s "Backup Success" email at domain.com <
> /home/www/backups/mailtext
>
> The tar backs up the directories into a tar file
> The mysqldump creates a mysql dump of the drupal
> database to a .sql file
>
> I then FTP these files to my backup server and email
> myself a message
>
> I saved this as backup.cron and placed it in my
> /etc/cron.daily directory.
>
>
>
> --- Anisa <mystavash at animecards.org> wrote:
>
>> So, the other day, my server's database completely
>> crashes.  They
>> restored it, but you know..  scary stuff.  And of
>> course, while I could
>> imagine files mysteriously disappearing, and kept
>> backups of all that, I
>> never thought about the database, so I was
>> backupless.
>>
>> But it's a pain to manually do regular backups, any
>> ideas on how to
>> automate it?  I use mysql, and normally access it
>> with phpmyadmin.  That
>> is, if there are any good ideas that don't involve
>> cron jobs.  ^.^:
>>
>> Anisa.
>> --
>> [ Drupal support list | http://lists.drupal.org/ ]
>>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
> http://promotions.yahoo.com/new_mail
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>




More information about the drupal-support mailing list