1
yingzhao
backup & restore best practices
  • 2010/6/15 20:16

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


I am almost ready to release my two xoops sites in 2.3.3 & 2.4.4. Before I go production, I would like to figure out what backup routine I should take.

My host is hostmonster. Using Cpanel, I can make a full backup of my account, including all my files & dbs. Hostmonster says that I can use this backup, only if I were to move to another host. So for disater recovery purpose, I do not think this is the approach to go.

I found the following FAQ, https://xoops.org/modules/smartfaq/faq.php?faqid=150,

I followed the instructions and backed up xoops files and db at the host. For testing purpose, I wanted to restore the backup onto my local xampp environment. I loaded the db to my local database, and put xoops files in place. The FAQ tells me all I need to do is modify the mainfile.php. Here is my modification for my local xampp environment.

define( 'XOOPS_ROOT_PATH', 'c:\xampp\htdocs\beauty' );
define( 'XOOPS_PATH', 'c:\xampp\beauprod\site_lib' );
define( 'XOOPS_VAR_PATH', 'c:\xampp\beauprod\site_data' );
define( 'XOOPS_URL', 'http://localhost/beauty' );
define( 'XOOPS_DB_USER', 'root' );
define( 'XOOPS_DB_PASS', '' );
define( 'XOOPS_DB_NAME', 'beauprod' );

Unfortunately, my restore does not work. It does not even get to the point that it needs to connect to db.

Could you share your thougts what I should do keep my backup rotine simple and effective? Many thanks in advance.

2
bjuti
Re: backup & restore best practices
  • 2010/6/15 20:25

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


In one case, clean _data dir. In other, check again paths.

About database: Did you first made database 'beauprod' in MySQL, and then import in it you db from live site?

3
culex
Re: backup & restore best practices
  • 2010/6/15 20:36

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


I agree cleaning all caches, and make sure the database is equal to the one you are importing from..

I'm unsure of the urls in my testing server I use the http aproach (Wamp server)

for instance with my xoops 2.4.4

define('XOOPS_URL', 'http://localhost/244');
Programming is like sex:
One mistake and you have to support it for the rest of your life.

4
Peekay
Re: backup & restore best practices
  • 2010/6/15 20:41

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I can highly recommend phpMySQLAutoBackup

It dumps your whole site DB to a SQL file, ZIPs it and emails it to you, so you have an off-server database backup! Email attachment size of less than 500 Kb for a small to medium sized Xoops site. You can run it with cron. I have had a successful restore from the SQL.

http://www.dwalker.co.uk/

For files (uploads) you could use FTPSynch (Free) Run it as a scheduled task and you have an off-server file backup too.

http://www.fileware.com/products.htm

or combine both the above procedures with SiteVault.

http://www.site-vault.com/

You have to pay for SiteVault, but it is very good.
A thread is for life. Not just for Christmas.

5
Mamba
Re: backup & restore best practices
  • 2010/6/15 20:43

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


For backing up just the database, try the BackPack

For the files, you could use FTP.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

6
yingzhao
Re: backup & restore best practices
  • 2010/6/15 21:34

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


Thank you so much for your quick response. I turned on debug on the restored site, and found out what the problem is. It is complaining about redeclaration of a function, date_diff, used in my modules. So I commented out this function, the restored site seems to be working now. Perhaps, date_diff has already been built in xampp? Because I could not find its other declaration in xoops.

7
ghia
Re: backup & restore best practices
  • 2010/6/15 21:55

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


What was the exact message?

8
anderssk
Re: backup & restore best practices
  • 2010/6/16 9:23

  • anderssk

  • Quite a regular

  • Posts: 335

  • Since: 2006/3/21


I have a nice little script for Cpanel.
It creates the full backup of mail, DB and files as You can do inside the Cpanel userinterface.

In the Script, there are the settings to my own FTP-server.
My FTP-server runs on my workstation, but when I bye a NAS-server i will send the backup to that trough a Cron-job.
It is a full backup and not a incremential backup.

Is there so many Cpanel-users that a module is needed?


Adminsection with
1) Values for Cpanel useraccounts/pwd
2) Option to clear the cache before taking backup
3) Values for FTP server, user/pwd
4) SFTP (secure ftp)






Login

Who's Online

411 user(s) are online (282 user(s) are browsing Support Forums)


Members: 0


Guests: 411


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits