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.

Routine backup

edited October 2006 in Vanilla 1.0 Help
I wanted to ask a question about whether and how people do routine backups of their Vanilla forums.

In the pre v1 days, there was somewhere a way to backup the database from within Vanilla. I couldn't get it to work, but there was a note explaining why that would be, so I didn't worry much, and waited for v1. Now I don't see any sign of such a process, and I couldn't find anything when I searched the documentation.

Was this an add-on that hasn't been updated to v1?
Does anyone see any value in providing for backup within Vanilla?
What do most people do - risk data loss, use phpMyAdmin, or what?
Has anyone saved via phpMyAdmin, lost their data and restored it fully successfully so we know there are no hidden traps?

I hope these aren't stupid questions, but I'm not very knowledgable about these things, so what may be obvious to most of you won't necessarily be so clear for me.


  • Options
    I think that was part of the clean up extension which Mark never bothered porting. It probably would be a useful extension though. Probably the easiest way otherwise is just to do a mysql dump at command line (if you're familiar with it) or from within phpmyadmin. The only problem with backing up in phpmyadmin (well it's not really a problem so far as backing up goes) is that you can [usually] only import a file under a certain size (in order to restore the backup, for example). That said if you did have to restore it you could probably work out how to use the command line in an hour of need or just break the phpmyadmin file down into smaller chunks.

    Theres a lot of brackets in there and it's probably senseless but hopefully you'll get something useful out of it. Long day.
  • Options
    I use cron jobs on my server. I make backups of all my DB's every night. Call me paranoid.

    But I have used phpmyadmin many times, and still do on my local server. I have made many many backups/restores of DB's 100% successfully.

    I believe phpmyadmin had a 2mb "upload" limit, if your file is over that I think you can just paste the text into the phpmyadmin window, I think.
  • Options
    "Has anyone saved via phpMyAdmin, lost their data and restored it fully successfully so we know there are no hidden traps?" See this : I hope that Mark could port the clean up extension soon ...
  • Options
    Krak, can you go into a little more detail about the cron job you have fort db backup? I'd like to do this, but I a don't know how.
  • Options
    You need shell access to get er done. If you don't know how to use cron jobs you should do a little reading, as I am probably not the best person to teach it. But this is something like what mine looks like... 0 2 * * * mysqldump -u'username' -p'password' --opt db1 > /var/backups/db1.sql 0 3 * * * mysqldump -u'username' -p'password' --opt db2 > /var/backups/db2.sql 0 4 * * * mysqldump -u'username' -p'password' --opt db3 > /var/backups/db3.sql 1st is the time the job is done. 2nd is dumping it, and the user/pwd for the db, then the name of the db 3rd is the location to place the backup -opt = --add-drop-table --add-locks --create-options --disable-keys --extended-insert --lock-tables --quick --set-charset > overwrites >> appends
  • Options
    I have a cron job that runs every day & I use Syncback to download it to my home computer.

    My cron job is:

    /usr/local/bin/mysqldump -uUSERNAME -pPASSWORD DATABASE | /usr/bin/gzip > /PATHTOBACKUP/vanilla`date +\%y_\%m_\%d`.gz

    I have to go in occasionally & manually delete the old files, but this way I have a rolling backup and in case something gets screwed up, say, when I'm on vacation, newer bad database versions won't overwrite my local good versions.
This discussion has been closed.