Easy Backup & Restore a must!! (25 posts)

  1. Stoofa
    Posted 10 years ago #

    OK, so I'm a novice to all this online stuff.
    I have a website, it has some forums which has a few hundred registered people and a fair few active ones.
    It has a Blog, running WordPress 1.2 of course.
    It also has other bits and pieces - it is my corner of cyberspace and I'm happy enough with it.
    A little while ago I had the need to change who hosts my website.
    I was having extended downtime and although my website is by no means "that popular" it was getting annoying.
    Moving my site wasn't a major issue - I use FrontPage 2003, so I simply moved site and then uploaded everything again.
    Soon my site was working, with the exception of my Forums (running on phpBB) and Blog (WordPress 1.2).
    I must admit I was worried on both fronts, both are free pieces of software - surely moving was not going to be easy.
    Lets take phpBB and by using the built-in tools I was able to do the following:
    Enter Administration
    Click "Backup Databse" and a few seconds later I was downloading a file that was in GZIP format.
    I soon had 3mb .sql file which was apparently compressed.
    At my new hosts I installed phpBB (which I've always found quite easy) into the same sub directory as before.
    Entered my totally empty forums, went to administration and clicked "Restore Database"
    It asked me to browse to my backup, I sent the .sql file back still in GZIP format.
    Within five minutes my forums were back, all my users were there, all my posts were there it was as if I'd never moved.
    There seems to be nothing built-in to WordPress to allow me to do the same.
    There seems to be some kind of "hack" that I can install which adds the facility to download my Blog however that is seven files and I don't know what to do with them once I have them.
    I did read through the readme files and some online direction, but I'll be honest, I'm impatient and I also started getting nowhere.
    In the end I ended up installing WordPress 1.0, upgrading it to WordPress 1.2 and the manually re-typing all my Blog entries for the 2 months I'd been writing it.
    My Blog is now 8 months old and I'm scared.
    Scared that I'm not taking adequate backup's and scared that I couldn't move to another host if I wanted as I wouldn't know how to move my Blog.
    I don't know how far 1.3 or the next version is away from "release" but it needs something as simple as the phpBB backup & restore function built in.
    I need to be able to click a single button and have a single file downloaded.
    I then need to be able to reinstall WordPress and upload that single file and find everything back to normal.
    Sorry if such a feature has already been discussed - it's late :)

  2. Root
    Posted 10 years ago #

    Am I right in thinking that export / import is included in the functionality of mysql ?

  3. Joni
    Posted 10 years ago #

    You can install the One-Click backup plugin that works with whatever version of WP you are running. It makes two separate backup sets, one contains your MySQL database and the other is copies of all your WordPress files. You can accomplish the same thing using FTP to download your site contents to your hard drive (and optionally, burn it to a CD). Then, when/if disaster strikes, just FTP your backup up to your site folder.
    And Root is right. You can go through PHP Admin (check your Cpanel) to export a text file containing your WP database. But that won't help you recreate your templates (if you've modified them) or any images and other data you may have on your web site.

  4. moshu
    Posted 10 years ago #

    Root, you might be right :)
    In my phpMyAdmin is there. Nevertheless I always get goosebump if I have to "backup" and/or move my database, but I've managed - last time about a month ago. Actually it was much, much easier than I thought!

  5. Jack
    Posted 10 years ago #

    jonimueller, which One-Click backup plugin are you referring to?

  6. ryoken
    Posted 10 years ago #

  7. Beel
    Posted 10 years ago #

    I have the backup and restore plugin but whenever I happen to be "in" mysql or phpmyadmin, I make a backup. I would be foolish to trust a "feature" backup in a separate program, especially when it isn't really any easier than the backup provided by the program whose data I want to back up. I only "trust" mysql's backup - and its backup function is not likely to "break" with the next release. Next perhaps I would choose phpmyadmin because it is specifically for administering mysql. The last (and least) backup function I would trust would be any provided as a plugin or "feature" of WP or any other program.

  8. ryoken
    Posted 10 years ago #

    i agree with Beel on that one. i just grab my tables through phpMyAdmin

  9. Anonymous
    Posted 10 years ago #

    There was talk of introducing an xml-based export feature in 1.3 which would allow you to migrate data into a fresh install of WordPress. In the meantime, you should always keep a backup of your database.
    Backing up in phpMyAdmin:

  10. Muffinboy
    Posted 10 years ago #

    With all due respect, but advising someone to go through phpMyAdmin for a backup of another program's data isn't very userfriendly. We're all a bunch of geeks who don't think much about going into phpMyAdmin and running a backup, but it's giving Stoofa and a lot of other people goosebumps, because they're afraid of messing something up they don't understand.
    Putting a one-click backup function in WP as a standard will do a lot for less technically inclined users' level of trust in the application and will make it easier for these people to recover from disaster or moving to a new host.
    I think it's as important as the latest nightly's interface for theming your WP blog, maybe more important even :)

  11. Mark (podz)
    Support Maven
    Posted 10 years ago #

    I agree it would be nice to have that installed as standard, but I wrote that guide, using screenshots, because it is conceiveable that for some reason, someone may get locked out of their blog.
    phpmyadmin is powerful stuff, but doing a backup / restore isn't high on the danger rating as no data is actually being manipulated.

  12. charle97
    Posted 10 years ago #

    good hosting providers have backup and restoration tools available. if you have cpanel, it takes a few clicks to backup and restore your entire account, including your database. what can be easier than that? if your hosting provider doesn't have easy to use backup and restoration tools, then you should switch providers.

  13. maphew
    Posted 10 years ago #

    Being somewhere between an average user and a geek, I am comfortable using phpmyadmin to backup and restore the WP database. However I'd still really like to see something like Stoofa described for phpBB, largely because it would be more convenient.
    I'm using WP in the first place because of its famous 30 second install. There are a variety of other tools out there with similar functionality, and some of them have installation procedures which aren't *that* much work. None that I've looked at though are as _convenient_ as WP. :)
    I should have to install WP only once or twice at most, backup and restore though will happen much more often. So in my mind, having a 30 second backup/restore feature in WordPress is perfectly in line with its core goals.

  14. cloudless
    Posted 10 years ago #

    I recently migrated my WP1.2 to a new web host, and I was not happy with the experience. WP should provide an XML-based backup, so it can be copied to a new web host or a new database easily.

  15. davidchait
    Posted 10 years ago #

    exporting and importing is pretty easy via MySQL. Of course, for someone like me, that's only one piece of the backup equation -- some things are stored in flat files, or mods to php files, or new files added (plugins), etc. the 'average' user might forget to back up some of those things too. (Note I'm not even suggesting that WP deal with that level of backup!)
    it might be nice if there was a 'migration' script, specifically to move a WP installation between servers. just a thought.. ;)

  16. paperlion
    Posted 10 years ago #

    @ Podz..
    You wrote above (2004-09-15):

    phpmyadmin is powerful stuff, but doing a backup / restore isn't high on the danger rating as no data is actually being manipulated.

    WP's default encoding is UTF-8 (Unicode) but mySQL's default is Latin (ISO-8879?). Aren't there parameters to be specified when doing a backup through either command-line mySQL or phpmyadmin to avoid encoding conversion and its attendant errors? If so, is 1-click backup any different? If it isn't, is there a way to micro-manage its doings to insure against re-encoding on backups here too?

    Footnote: Does phpmyadmin, mySQL, 1-click restore, or WP itself fool around with encoding in any way on a restore?

  17. pericat
    Posted 10 years ago #

    % mysqldump [database name] --user=[username] --password=[password] > [backup filename]

    You should be able to open your backup file in a text editor. What's there is not only your data, but all the commands needed to re-insert it exactly as it was into an empty database, table names and all.

  18. paperlion
    Posted 10 years ago #

    pericat; not sure what point you're making.

  19. pericat
    Posted 10 years ago #

    you asked:
    "Aren't there parameters to be specified when doing a backup through either command-line mySQL..."

    The command I quoted is basically it, if you want to dump your database to a file from the command line.

  20. The WordPress One-Click Backup plugin is now compatible with WP v1.5:

  21. paperlion
    Posted 10 years ago #

    Aha, Pericat - I got it. thanx.

    I tried a conversion of a sql dump file using Notepad++ and couldn't get it to work. I think it was because a lot of the posts had been pasted in from other programs and encodings though.

    I think there's a way to specify UTF-8 on the sql dump command though also, which should eliminate the text-editor step of converting it all back.
    I think it uses the iconv utility which someone just pointed out to me here:


    iconv -f iso-8859-15 -t utf8 wordpress.sql > wordpress-iconv.sql

    However, I'm not sure of the syntax, especially where the file being imported has unknown or mixed encoding schemes.

  22. pericat
    Posted 10 years ago #

    I am for sure missing something-- why would you want to convert the dump file if its purpose is to be a backup? Isn't how it comes out the same form in which it needs to go back in?

    I can see doing this if the data is in the wrong format to begin with, but once it is correct, you ought to be able to dump/restore without any intervening steps.

  23. paperlion
    Posted 10 years ago #

    If you open a 1-Click Backup html file, for instance, (and probably a phpmyadmin sql text file too), you'll notice in the commented header, that the encoding is ISO-something [8879?]. WordPress by default is UTF-8 though.

    From what I understand, mySQL doesn't support UTF-8 (or other Unicode) well, less so in the past, and not by default. Thus, the encoding is changed during a backup.

    Restores will also remain in the non-unicode scheme, since 1) the same mySQL is used to do the restore, and 2) WP encoding settings only work for new posts, not restored ones or those in the database prior to an encoding change.

    That's the way I understand it, and I believe it is what's caused a lot of posts to look garbled after being restored from either a phpmyadmin or a 1-Click Backup restore (which I believe are essentially the same thing).

    Most users probably won't notice a difference, but many of my posts were pasted from emails - much of these from various foreign sources with a few different encodings. Not sure why they pasted okay into WP, but they sure didn't backup well. Trying to change the encoding in the actual backup files didn't work too well either (yet?). Seems the encoding modifications being done during backup routines are causing the problem though in getting it to look the same as before the backups.

  24. Lorelle
    Posted 9 years ago #

    This topic comes up a lot so here is some new information.

    There is now a new plugin to backup your database to your server, your computer or via email. You can read more about it http://asymptomatic.net/wp/2005/07/22/1775/wp-database-backup-v15/
    and download it http://redalt.com/downloads/
    It's called the WordPress Database Backup Plugin.

  25. And, more information on WordPress backups can be found here: http://codex.wordpress.org/WordPress_Backups

Topic Closed

This topic has been closed to new replies.

About this Topic