Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

How to backup SilverStripe site


Reply


5 Posts   915 Views

Avatar
sylco

Community Member, 10 Posts

22 March 2013 at 1:44am

Hi,

Is there an “official” or recommended way to back up a SilverStripe site?

I am really new to sites built this way and I suppose one needs to backup the SilverStipe installation folder and the database. Should I back up anything else? I am using WampServer and SS 3.0.5, is there a way to automate these tasks?

Thanks!

Avatar
martimiz

Forum Moderator, 1132 Posts

25 March 2013 at 1:41am

Edited: 25/03/2013 1:42am

There is no 'official way' I think. An important thing would be to frequently create a dump of your database, and you'd want to also backup the assets directory, where youre files & images live and your mysite folder. Keep the original install of silverstripe and modules clean and that's all you'll really need to do

I keep a mirror of my installs on my workstation for my own sites, and try never to edit anything online, so i really only need to backup the database, but that means you need to be very consistent, especially with your assets!

Martine

Avatar
sylco

Community Member, 10 Posts

26 March 2013 at 5:49am

Thanks for the suggestions, martimiz!

Concerning the datatbase itself, I see that the WampServer’s stack saves databases in :
\wamp\bin\mysql\mysql5.5.24\data\

And that the SS database is kept in the SS_mysite subfolder of that folder.

Would creating a backup copy of this SS_mysite subfolder be the same as dumping the SS_mysite database from mysql into a file? I am asking because I feel it would probably be easier for me to automate the backup of a subfolder than the dumping of a database from mysql.

Avatar
martimiz

Forum Moderator, 1132 Posts

26 March 2013 at 6:34am

Edited: 26/03/2013 6:34am

Not the same - these are 'internal' MySQL databatable/index files. A MySQL dump is basically a textfile with a whole lot of MySQL commands in it, that can rebuild a database from scratch.

I'm absolutely not sure if you can just copy these internal MySQL database files to another server or even another MySQL version and always expect things to work. I Wouldn't even try it :)

On the otherh hand: exporting your database from within phpMyAdmin, or another MySQL client, or even using mysqldump from the commandline isn't difficult at all, so...

Avatar
sylco

Community Member, 10 Posts

27 March 2013 at 4:01am

Ok, I see.

Thanks again for the help!