Forums / Setup & design / Regular site backup

Regular site backup

Author Message

Halvor M

Monday 25 July 2005 4:00:47 pm

I have read around on this topic, and seen some different solutions...

How do _you_ perform regular backups - and is this possible to do without having to use a lot of time every time you want to perform a backup?

I have seen references to a module that supposedly performs an automatic backup - that sounds rather nice :-)

The reason I am asking is that I am not very comfortable with sql, and would hate to lose the info already on my site...

thanks !

Mikael Johansson

Monday 25 July 2005 10:36:12 pm

Are you using windows or linux?

We're running on Linux, where we have setup a cron job that does a mysqldump at regular intervals. It also backups the ezpublish folder.
You should be able to do the same with windows scheduler or whatever it is called if you're running on windows.

Mikael Johansson, Sweden

Gabriel Ambuehl

Tuesday 26 July 2005 12:53:57 am

While not ultimately necessary for ezpublish IIRC, be sure to add -Q into the mysqldump params or you might not be able to reimport the generated SQL if the table names contained unusual (yet valid) chars.

I've got bitten badly by this (why they don't do this by default I don't understand) a few weeks ago.

Visit http://triligon.org

J-A Eberhard

Tuesday 26 July 2005 2:29:35 am

Hi,

I'm using the following contrib and I'm happy with it as it save also special templates and ini files in an archive. Grab it from http://ez.no/community/contribs/3rd_party/ezpublish_site_backup_script

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Halvor M

Tuesday 26 July 2005 4:40:15 am

Well, I am running my EZserver on a WinXP system using MySQL.

The script Eberhard mentioned seemed very appropriate for my needs, but it looks like it was made for a linux system.

Am I correct in asuming that in order to perform a backup, I would only need to:
1. Copy EZ folder from web server, and
2. make a sql dump

What then, is the exact string I would need to write in sql (or can I use phpadmin interface?). Sorry that I am asking for such basic information, but some of us are getting by more due to sheer persistence and bloody-mindedness than you IT-gods out there :-)

Gabriel Ambuehl

Tuesday 26 July 2005 4:47:37 am

I think you can do SQL dumps in phpmyadmin. It might take a while though.

If you got shell access, read the docs for mysqldump.

Visit http://triligon.org

Ɓukasz Serwatka

Tuesday 26 July 2005 5:07:31 am

On Windows 2000 and XP it is possible to use the "Scheduled Tasks" mechanism to automatically run the maintenance file. You can create .bat file and write some simple commands like:

cd C:\mysql\bin
mysqldump something > file.sql
copy file.sql d:\backups

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Halvor M

Thursday 28 July 2005 3:04:48 pm

Thanks!
I have both phpmyadmin and shell access to mysql.

I have been trying various commands in the shell, but it doesnt seem to work. I am really scared of doing something wrong here that could put my existing info at risk (which is why I need the backup to start with).

Exactly what is the backup line to use in mysql?

alternatively: Is "export" the correct function to use in phpmyadmin, and could someone post a screenshot of the admin screen so I can see how to set the options?

btw, this is what I tried in mysql:

>mysql [name of database]-u [username] -p < file.sql

I also tried:

mysqldump [name of database]-u [username] -p < file.sql

In both cases I get error message that the file was not found.

I think a clear answer to this would be of benefit to others users who adhere to the same level of ineptitude as myself :-D

Yours gratefully,

Halvor

Konrad Mazurkiewicz

Thursday 28 July 2005 3:42:31 pm

Hi,
Lukasz show you right way.

You shouldn't use '<' but '>'. ;)

Konrad

Halvor M

Thursday 28 July 2005 4:11:38 pm

OMG!
It worked! I am a genius :-P

Thanks for the help. A sql file was now generated, and I will follow Lukes advice and put this into my scheduler.

What would be the sql command for importing this back into mysql if I do at some point have to move or rebuild the site?