HOWTO - back up your blog.

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

HOWTO - back up your blog.

Post by gwilsonmail »

Original title was - "how do you backup your blog?

I've looked and can't find a description of how to go about backing up a s9y blog installation?

Apart from a few config files in the root directory there seems to be little point in backing up the html/php files. All the data appears to be in the sql database.

if there a command or php script to backup everything so that a restore can be carried out when sh*t happens (and it surely will). :?

Is there a need to backup the plugins directory so you can reproduce this directory to match what the database list as being the installed plugin? s9y complains if it "thinks' you have a plugin installed but itcan't find the files in the appropriate directory.
Last edited by gwilsonmail on Wed Jul 20, 2005 2:22 pm, edited 1 time in total.
gw
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: backing up your blog?

Post by garvinhicking »

The important files are:

* "uploads" directory
* serendipity_config_local.inc.php
* .htaccess
* plus any files you manually modified (templates? plugins?)
* plus any plugins you installed apart from the bundled ones

Then backup all of your serendipity_* DB tables with a SQL dump:

Code: Select all

#!/bin/bash
mysqldump serendipity > serendipity.sql
tar -cvzf backup.tgz serendipity.sql serendipity_config_local.inc.php .htaccess templates/ plugins/ uploads/
You can restore that easily:

Code: Select all

#!/bin/bash
tar -xvzf backup.tgz
mysql --execute="DROP DATABASE serendipity; CREATE DATABASE serendipity;"
mysql serendipity < serendipity.sql
(Untested, but should work for MySQL. Make sure you add your username/password information to the "mysql" and "mysqldump" commands.)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

Post by gwilsonmail »

thanks.
gw
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

Post by Josh »

I don't know what to with the code to backup all of your serendipity_* DB tables with a SQL dump.

However, my host provides an eays database back-up and gives me the following additional options:
  • Mit Drop Tables
    Keine Create-Statements
    Extended Insert
    Quick
    Lock Tables
Should I check any of them?
PerfectCr
Regular
Posts: 90
Joined: Mon Nov 21, 2005 2:21 am
Contact:

Post by PerfectCr »

Question: I am using SY9 through godaddy.com, I did the install through their control panel.

Am I still able to back up my files using this method? I asked them and here is what they said, but I am not sure I trust them. Any help you guys can provide would be great! :)
Thank you for contacting customer support. Unfortunately, it is not possible to make a backup of the database and blog itself for the free hosting applications when installed from the control panel. In order to have full access to the database to make backups, you will need to do a manual installation of the application.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

PerfectCr: The godaddy support is right, only a "true" Serendipity installation can do that for you, because then you have your "own" database.

Josh: Check "Mit Drop Tables" and let the other options unchecked.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

Post by Josh »

Thank you!
Guest

Post by Guest »

garvinhicking wrote:PerfectCr: The godaddy support is right, only a "true" Serendipity installation can do that for you, because then you have your "own" database.

Regards,
Garvin
Thanks Garvin. Well I guess I could install it myself, apart from godaddy. I am a newbie at this stuff. Is there a dummy guide that could walk me through how to install it myself?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

The install process itself is a dummie guide. It's really easy, you can't do much wrong :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
PerfectCr
Regular
Posts: 90
Joined: Mon Nov 21, 2005 2:21 am
Contact:

Post by PerfectCr »

garvinhicking wrote:The install process itself is a dummie guide. It's really easy, you can't do much wrong :)

Regards,
Garvin
I have never once used MySQL or PHP. The godaddy server offers PHP, and comes with 10 MySQL databases. Would I have to install MySQL separately or use godaddy's embedded install?

Sorry, I am a complete and total noob. I am very good with desktop aps and hardware, but when it comes to server aps I am at a loss. I think you install guide assumes a certain knowledge and understanding of how to install and manage databases and server side aps. Am I screwed? :( :shock:
PerfectCr
Regular
Posts: 90
Joined: Mon Nov 21, 2005 2:21 am
Contact:

Post by PerfectCr »

Further info from godaddy....

I asked...
What happens if I want to move it later on from a contol panel installation to my own installation, how will I be able to move all of my data that you are currently hosting? Thanks!
They said...
If you intend to do this, I would not recommend our installation of the software, unless the software offers some kind of "export" facility [I'm not an expert on the product in question]. I would recommend installing the program manually in your hosting account; this would give you access to the database, and you could then export the data from it for uploading into another database elsewhere. However, please note we are largely unable to assist with such manual installations, or any subsequent trouble-shooting which may be required.
So that is my question, do I also need to do a separate manual install of MySQL? Or could I use the provided Databases? Sorry and thanks for your help.

The reason I ask is because I want to be able to do backups of my blog in case I want to move to a different host in the future.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Yes, you would do your very own installation of Serendipity in your own FTP space and on your own MySQL database! You cannot access the content of your provider's database I think. You might want to ask them for a DB dump, though - so that you can import your old entries. The s9y export only exports via RSS feed, and that looses some of your content.

Setting up MySQL isn't so hard, I think. I don't know what server management godaddy uses, though, but usually it's just a matter of a few clicks to setup a MySQL DB.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
PerfectCr
Regular
Posts: 90
Joined: Mon Nov 21, 2005 2:21 am
Contact:

Post by PerfectCr »

Thanks Garvin. I did ask Godaddy this question, so it looks like i may be okay! I will do an manual install and use the provided MySQl database godaddy offers. Here is what they told me about exporting. Does this look like it will work? Thank you sincerely for all your help!!!
To export the data from your MySQL Database, follow the instructions below:

From PHPMyAdmin:

. Enter your username and password for your database.
. Click on the 'Export' tab at the top of the page.
. Click on the radio button corresponding to the type of file you want to save your data as. The most common option used is 'Structure and Data', which will save the file as a .sql file.
. Check 'Save As file'.
. Click on 'Go'.
. This will prompt you with an option to save your DB as a .SQL file for future database creation.
Wizard
Regular
Posts: 103
Joined: Sat Aug 13, 2005 7:18 am
Location: Southern California
Contact:

Post by Wizard »

I too use GoDaddy. I found it impossible to use PHPMyAdmin with the database since it wasn't "my" database (one of the 10) but one of theirs that they give access to. I originally installed Serendipity through the control panel. How were you able to connect using PHPMyAdmin?
Wizard
My WeBlog
PerfectCr
Regular
Posts: 90
Joined: Mon Nov 21, 2005 2:21 am
Contact:

Post by PerfectCr »

Wizard wrote:I too use GoDaddy. I found it impossible to use PHPMyAdmin with the database since it wasn't "my" database (one of the 10) but one of theirs that they give access to. I originally installed Serendipity through the control panel. How were you able to connect using PHPMyAdmin?
They are saying that if I use one of their databases (1 of 10) but do a manual install of SY9 (not through the control panel) then I WILL be able to back up the database from the PHPMYadmin panel (also accesed through the control panel).
Post Reply