Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

DB Backup for vanilla

I have the cleanup extension and i've used the database backup function in there. But how can I check it has worked? I'm paranoid about losing my data.

Is there a surefire way to backup, even a way to be able to do it automatically for me?

Any help much appreciated.


  • MarkMark Vanilla Staff
    You can always set up something outside of Vanilla entirely. If you have shell access, you can write a script to do an hourly/daily/weekly dump for you.
  • MarkMark Vanilla Staff
    Here's a discussion on wordpress about how they accomplished it:
  • Thanks for heads up on the cron jobs Mark. I took a look at the options my host has and it provides a cron job feature whereby I can a command or php page at on a regular schedule. I've opened a support ticket with them to see if they can help me out further.
  • MarkMark Vanilla Staff
    Be sure to post on here with whatever you come up with. I'm sure others would be interested to know.
  • ok i got a cron job set up with the following command.

    mysqldump -u DBUSERNAME --password=DBPASSWORD DBNAME

    i simply replaced the details in caps and then I selected the options for choosing the schedule it would run that command on. I now get an email with all the sql in it every day. Obviously this will vary depending on your own host.

    alternatively you can run a .php file using the following command...

    wget -q

    it doesn't matter where you upload the file to. but using this method you could get the php page to create an attachment to send to you via email rather than all the sql being posted into it directly.

    hope this helps someone along the line.
  • N.B. On some (the majority, i believe), you can use php as a command line to execute phpscripts. i.e. php /home/me/dump.php. Not much different but just a little tidier imo.
  • OK, this is good. I haven't actually done it yet, but I think I can. But if you do all that and your DB crashes, how do you use the dump info to restore?
  • Well if you have shell access you can restore a database backup quite easily, or if you don't you can use phpmyadmin to import the sql dump.
  • edited June 2006
    I am trying to back up my database from phpmyadmin. (vanilla 1.0..) I have the export panel in front of me, which options should I check to have a complete image of the database ?
  • edited June 2006
    from phpmyadmin, select the vanilla DB, click on export.
    Keep the default option, click on "select all" (table), tick "Add DROP TABLE" and "Save as file", and click on "go".

    Keep in mind that the import fonction in phpmyadmin is limited to files with a size < 2 Mo (that the php limit for upload by default).
  • "But if you do all that and your DB crashes, how do you use the dump info to restore?"
    With a shell access, it is this simple command:
    mysql -u DB_user -p User_password -D Vanilla_db_name < /path/to/Vanilla_backup.sql
This discussion has been closed.