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.

Easiest way to backup (and restore) users/posts?

robbrobb New
edited March 2007 in Vanilla 1.0 Help
I'm going to delete my current Vanilla install due to problems upgrading (it's messed up). What's the easiest way to back up my users and posts and restore them after a fresh install? Thank you!

Comments

  • Take a mysqldump of your database (excluding any tables dedicated to extensions)
  • robbrobb New
    edited March 2007
    What's the command? Can I use phpmyadmin? What options do I need to look out for? How do I exclude tables dedicated to extensions? How do I restore the backup? Thanks.
  • You don't need to if you can use an other db.

    Install vanilla with a dummy db. Reinstall all your addons. then go into /conf/database.php and change the settings to use the previous table.

    Marc explain that recently. You can look for it if you need more details.
  • Dinoboff, does that use the user database AND the posts, per robb's request?
  • edited March 2007
    @Alison - if you just tell a new install to use the older database, yes, the new install would just use the old DB (and all its fields)
  • edited March 2007
    I'm confused, Gauzy. If you tell it to use the old, it would use the new? Part of my problem is that I'm not sure WHERE the users are stored in relation to the actual board posts.

    Also, I can't find Marc's explanation that Dinoboff referenced. Can anyone give me more clues to search for?
  • @alison - sorry, my wording was a little confusing. i've edited my post to make it a bit more clear. what dinoboff is saying is install a new copy of vanilla. set it up so that it uses a dummy DB, one that you don't intend to actually use. then, change the conf/database.php file to point at the new DB. sorry about that confusion. @robb - to back up/restore using phpMyAdmin: backing up: 1) select the DB you want to back up on the left. 2) once it loads it on the right, along the top there should be an "export" tab. click this. 3) hit "select all" to select all the tables, make sure the "sql" button is selected (it is by default). you can leave all the other options as they are. 4) at the bottom, check the box that says "save as file." i saved it as a .zip, but you can use whatever you like. 5) click "go." the browser will download the table dump. restoring: i started completely fresh - i had deleted the vanilla folder from my server, installed a brand new copy. i told this to use a brand-new DB, as well. once i'd done this, i had a fresh install of vanilla, no posts, just an admin user. (this is just how i did it, i'm not sure that it's the best way or even most efficient, but it does work). from there, you could just edit the conf file to point at the old DB, but i did it a little differently: 1) go back into phpMyAdmin, select the new DB that vanilla is set to use. 2) towards the bottom, hit "select all," then select "drop" from the dropdown. confirm this. 3) everything will get dropped. if you check your forum now, it's a lot of nasty errors. 4) goto the "import" tab. 5) browse to the file you saved earlier, then click "go" at the bottom. (how long it takes depends...mine took about 5-10 minutes, so be patient. 6) it should confirm that the import was successful. if you go back to the forum, it'll be as it was before. dinoboff's solution is probably easier in the long run, and you don't need to muck with DB's at all.
  • Thanks, Gauzy. To clarify, are the POSTS stored in the same database as the users/passwords?
  • Yes, everything is stored in the same database (but in separate tables inside that database).
  • edited March 2007
    @ Alison: It has to be in the same DB, but they are not in same table. @Gauzy: Backing your bd is something you should regularly. However what I mean is that you don't need to backing up your db, drop the table, install the forum and then restore the db. You can just use an other db for the installation, and then change the vanilla setting on the new installation to use the old database. Here the post from Mark about it: http://lussumo.com/community/?CommentID=62030
  • @dinoboff - oh, yeah, i make regular backups of the DB and all. what i needed to do was re-install the forum, as there was a bug that wouldn't be squashed. so i made everything squeaky-clean first, most likely 'cause i'm obsessive-compulsive.
  • Thanks, all!
  • Gauzy: Wow thanks a lot. I had a bit of trouble importing the DB (it said I didn't have access to it, so I probably should have done some editing of it first) but everything panned out OK. If you're ever in Japan I'll buy you a beer :)
  • hey, no problem. glad it worked:)
This discussion has been closed.