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?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:28:29
Script start
Timing: Jan 18 2025 11:28:29
Module start 'layout'
Timing: Jan 18 2025 11:28:29
Module start 'content'
Timing: Jan 18 2025 11:28:30
Module end 'content'
Timing: Jan 18 2025 11:28:30
Script end

Main resources:

Total runtime0.9405 sec
Peak memory usage4,096.0000 KB
Database Queries86

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 587.9063152.6250
Module start 'layout' 0.00660.0034 740.531339.4297
Module start 'content' 0.01000.9290 779.9609760.6719
Module end 'content' 0.93900.0015 1,540.632820.1875
Script end 0.9405  1,560.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3962160.0002
Check MTime0.00150.1642160.0001
Mysql Total
Database connection0.00100.108110.0010
Mysqli_queries0.861291.5690860.0100
Looping result0.00090.0977840.0000
Template Total0.904796.220.4524
Template load0.00230.241220.0011
Template processing0.902495.949020.4512
Template load and register function0.00020.020010.0002
states
state_id_array0.00150.158110.0015
state_identifier_array0.00170.183520.0009
Override
Cache load0.00200.2139570.0000
Sytem overhead
Fetch class attribute can translate value0.00080.086460.0001
Fetch class attribute name0.00140.1527120.0001
XML
Image XML parsing0.00190.197860.0003
class_abstraction
Instantiating content class attribute0.00000.0023120.0000
General
dbfile0.00200.2112230.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 36
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs