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?

eZ debug

Timing: Jan 30 2025 21:14:13
Script start
Timing: Jan 30 2025 21:14:13
Module start 'content'
Timing: Jan 30 2025 21:14:13
Module end 'content'
Timing: Jan 30 2025 21:14:14
Script end

Main resources:

Total runtime0.2630 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0125 587.9063370.3047
Module start 'content' 0.01250.0331 958.21091,009.6094
Module end 'content' 0.04560.2174 1,967.82033,897.7891
Script end 0.2629  5,865.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00501.9120200.0003
Check MTime0.00140.5345200.0001
Mysql Total
Database connection0.00060.241910.0006
Mysqli_queries0.137552.27931410.0010
Looping result0.00140.53561390.0000
Template Total0.216482.310.2164
Template load0.00120.464610.0012
Template processing0.215181.801410.2151
Override
Cache load0.00090.328210.0009
Sytem overhead
Fetch class attribute can translate value0.00180.677610.0018
XML
Image XML parsing0.00030.100710.0003
General
dbfile0.02368.9834200.0012
String conversion0.00000.003830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs