Back up Cms
Back up Cms
Hi all
I started using cms in July last yeah but to my shame gave up using it due to the fact that I did not understand databases and how to back them up I tried many times and just got errors I have completed hundred or so pages for my site.
I am Hosted with 1&1
Database Version MySQL5.0
CMS Version 1.1
I have spent many hours in the past reading the forum but was unable to find a clear guide which i could understand
can anyone help with a simple step by step idiots guide
if i need to suppy anymore information then place tell me
I started using cms in July last yeah but to my shame gave up using it due to the fact that I did not understand databases and how to back them up I tried many times and just got errors I have completed hundred or so pages for my site.
I am Hosted with 1&1
Database Version MySQL5.0
CMS Version 1.1
I have spent many hours in the past reading the forum but was unable to find a clear guide which i could understand
can anyone help with a simple step by step idiots guide
if i need to suppy anymore information then place tell me
Re: Back up Cms
Hi Panzer,Panzer wrote: I am Hosted with 1&1
Database Version MySQL5.0
CMS Version 1.1
create a backup of your CMSMS site is very easy. Full backup process include two operations:
1) Backup your mysql DB
You can install a CMSMS module (Mysqlbackup) or you can use, if your hosting system provides, your admin panel probably with phpmyadmin.
2) Backup your files
Use your FTP or your panel again and save all modified directory
Note: if your provider support "tar" command you can use FileBackup module.
And backup is done
Regards
blast
Last edited by blast2007 on Tue Feb 26, 2008 10:56 pm, edited 1 time in total.
Re: Back up Cms
One note - you should clear the cache in Admin, so you're not copying all of the cache as well (it can get quite large).
Nullig
Nullig
Re: Back up Cms
Hi thank you for your replys this is what I did
I logged in to my 1 & 1 Account and went to MySQL Administration then to
phpmyadmin .
on the left-hand side is my database containing 79 files
I doubled clicked the database name and was taken to
View dump (schema) of database
Export
On the left-hand side were all 79 files
With the option to select all which I did
SQL (**** this box was already ticked****)
LaTeX
Microsoft Excel 2000
Microsoft Word 2000
CSV for MS Excel
CSV
XML
On the right hand side the options were
SQL options
Add custom comment into header (\n splits lines):
Enclose export in a transaction
Disable foreign key checks
Structure: (****this box was already ticked****)
Add DROP TABLE
Add IF NOT EXISTS
Add AUTO_INCREMENT value (****this box was already ticked*****)
Enclose table and field names with backquotes (****this box was already ticked*****)
Add into comments
Creation/Update/Check dates
SQL export compatibility: NONE ANSI DB2 MAXDB MYSQL323 MYSQL40 MSSQL ORACLE POSTGRESQL TRADITIONAL
Data: (****this box was already ticked*****)
Complete inserts
Extended inserts
Use delayed inserts
Use ignore inserts
Use hexadecimal for binary fields (****this box was already ticked*****)
Export type: INSERT UPDATE REPLACE
Save as file (****I ticked this one*****)
File name template: __DB__ ( remember template )*
Compression
None
"zipped" (****I ticked this one*****)
"gzipped"
"bzipped"
ok I now have my back up database well I think I do the 79 files have turned into 1 txt file ok I try to test my database backup by uploading it and I get this error
Error
SQL query:
-- phpMyAdmin SQL Dump
-- version 2.6.4-pl3
-- http://www.phpmyadmin.net
--
-- Host: db1032.oneandone.co.uk
-- Generation Time: Feb 27, 2008 at 05:14 AM
-- Server version: 5.0.45
-- PHP Version: 4.3.10-200.schlund.1
--
-- Database: `db212607008`
--
-- --------------------------------------------------------
--
-- Table structure for table `cms_additional_htmlblob_users`
--
CREATE TABLE `cms_additional_htmlblob_users` (
`additional_htmlblob_users_id` int( 11 ) NOT NULL ,
`user_id` int( 11 ) default NULL ,
`htmlblob_id` int( 11 ) default NULL ,
PRIMARY KEY ( `additional_htmlblob_users_id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 COLLATE = latin1_german2_ci
MySQL said:
#1050 - Table 'cms_additional_htmlblob_users' already exists
Sorry for being a pain when you know how to do it i bet its simple
Thanks in avance
Andy
I logged in to my 1 & 1 Account and went to MySQL Administration then to
phpmyadmin .
on the left-hand side is my database containing 79 files
I doubled clicked the database name and was taken to
View dump (schema) of database
Export
On the left-hand side were all 79 files
With the option to select all which I did
SQL (**** this box was already ticked****)
LaTeX
Microsoft Excel 2000
Microsoft Word 2000
CSV for MS Excel
CSV
XML
On the right hand side the options were
SQL options
Add custom comment into header (\n splits lines):
Enclose export in a transaction
Disable foreign key checks
Structure: (****this box was already ticked****)
Add DROP TABLE
Add IF NOT EXISTS
Add AUTO_INCREMENT value (****this box was already ticked*****)
Enclose table and field names with backquotes (****this box was already ticked*****)
Add into comments
Creation/Update/Check dates
SQL export compatibility: NONE ANSI DB2 MAXDB MYSQL323 MYSQL40 MSSQL ORACLE POSTGRESQL TRADITIONAL
Data: (****this box was already ticked*****)
Complete inserts
Extended inserts
Use delayed inserts
Use ignore inserts
Use hexadecimal for binary fields (****this box was already ticked*****)
Export type: INSERT UPDATE REPLACE
Save as file (****I ticked this one*****)
File name template: __DB__ ( remember template )*
Compression
None
"zipped" (****I ticked this one*****)
"gzipped"
"bzipped"
ok I now have my back up database well I think I do the 79 files have turned into 1 txt file ok I try to test my database backup by uploading it and I get this error
Error
SQL query:
-- phpMyAdmin SQL Dump
-- version 2.6.4-pl3
-- http://www.phpmyadmin.net
--
-- Host: db1032.oneandone.co.uk
-- Generation Time: Feb 27, 2008 at 05:14 AM
-- Server version: 5.0.45
-- PHP Version: 4.3.10-200.schlund.1
--
-- Database: `db212607008`
--
-- --------------------------------------------------------
--
-- Table structure for table `cms_additional_htmlblob_users`
--
CREATE TABLE `cms_additional_htmlblob_users` (
`additional_htmlblob_users_id` int( 11 ) NOT NULL ,
`user_id` int( 11 ) default NULL ,
`htmlblob_id` int( 11 ) default NULL ,
PRIMARY KEY ( `additional_htmlblob_users_id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 COLLATE = latin1_german2_ci
MySQL said:
#1050 - Table 'cms_additional_htmlblob_users' already exists
Sorry for being a pain when you know how to do it i bet its simple

Thanks in avance
Andy
Re: Back up Cms
Try with MysqlDump Module. It's easier.
Regards
blast
Regards
blast
Re: Back up Cms
Hi there
I am really not having much look tried to install MysqlDump Module. To be able to back up the site is such an important aspect of running a website it seems to me that I must be doing something really stupid.
should I delete the site and start again with the latest version of CMS
Will I be able to back that up
Module Manager Help | Community Help (new window)
Error!
Checksum error. This probably indicates a corrupt file, either when it was uploaded to the repository, or a problem in transit down to your machine.
expected: 57b8a458f98a60bbc2f5e7925588fd05 and got 703762acd6fd272df377bc3d8e305541
tried to uninstall but its not there
Andy
I am really not having much look tried to install MysqlDump Module. To be able to back up the site is such an important aspect of running a website it seems to me that I must be doing something really stupid.
should I delete the site and start again with the latest version of CMS
Will I be able to back that up
Module Manager Help | Community Help (new window)
Error!
Checksum error. This probably indicates a corrupt file, either when it was uploaded to the repository, or a problem in transit down to your machine.
expected: 57b8a458f98a60bbc2f5e7925588fd05 and got 703762acd6fd272df377bc3d8e305541
tried to uninstall but its not there
Andy
Re: Back up Cms
Dowload XML file from the Forge and use upload XML function in Module Section of CMSMS.Panzer wrote: Error!
Checksum error. This probably indicates a corrupt file, either when it was uploaded to the repository, or a problem in transit down to your machine.
expected: 57b8a458f98a60bbc2f5e7925588fd05 and got 703762acd6fd272df377bc3d8e305541
Regards
blast
Re: Back up Cms
Hi Blast
That seems to have done the trick thank you very much does MysqlDump Module work with the latest version of CMS im going to start up dating in the next couple of days
Also can you recommended anyone who can make me a template for the latest version CMS and a banner ill pay for the service
Thanks
Andy
That seems to have done the trick thank you very much does MysqlDump Module work with the latest version of CMS im going to start up dating in the next couple of days
Also can you recommended anyone who can make me a template for the latest version CMS and a banner ill pay for the service
Thanks
Andy
- lollipop27
- Forum Members
- Posts: 237
- Joined: Wed Sep 12, 2007 4:09 pm
- Location: Germany
Re: Back up Cms
Hi,
you should have checked one more option, when exporting the database...
Add DROP TABLE
then the error 'this table aready exists' would have been able to handle....
... I can do templates too..... write me a PM.
you should have checked one more option, when exporting the database...
Add DROP TABLE
then the error 'this table aready exists' would have been able to handle....
... I can do templates too..... write me a PM.

-
- Forum Members
- Posts: 85
- Joined: Wed Jun 20, 2007 5:40 pm
Re: Back up Cms
Hi all,
Got interested in this thread because of the 1and1 Plesk hosting, though professionally i use cPanel. Have been working on a cron job 4 cpanel that will mysqldump --all-databases, gzip em then cp the home directory (your CMSMS install) and .tgz that. And as a grand finale (like it should be that hard) download it to a local XP machine with filezilla on a schedule
Will post it next week if any one is interested...
Got interested in this thread because of the 1and1 Plesk hosting, though professionally i use cPanel. Have been working on a cron job 4 cpanel that will mysqldump --all-databases, gzip em then cp the home directory (your CMSMS install) and .tgz that. And as a grand finale (like it should be that hard) download it to a local XP machine with filezilla on a schedule
Will post it next week if any one is interested...
-
- Forum Members
- Posts: 72
- Joined: Wed Apr 04, 2007 9:54 am
Re: Back up Cms
Sounds great! I would be very interested in this. If it could also download all files related to the cmsms site too, I would be your biggest fan!! 

-
- Forum Members
- Posts: 85
- Joined: Wed Jun 20, 2007 5:40 pm
Re: Back up Cms
Try this, you WILL need to test it first and of course enter paths correctly and usernames/passwords etc. I'm not sure its perfect as I'm not using it at the moment so if anyone can see problems please update
1. Enter the below as one line as the cron command to run, changing usenrames and paths as appropriate
date=`date -I` ; mysqldump -uUSERNAME -pPASSWORD ––all-databases > /home/username/public_html/backups/xbackup_$date.sql ; gzip /home/username/public_html/backups/xbackup_$date.sql; cp -dpr /home/username/public_html/ /home/username/public_html/backups ; tar -cvzf /home/username/public_html/backups/backup.tgz /home/username/public_html/backups/
1. Run the above cron command at 1am each night, it will back up database and public_html directory in to a .tgz file
2. Set filezilla.exe on a scheduled job to run the next morning at 9am to download the tgz above to a local windows PC. I setup a ftp account in cPanel specifically for downloading backups from a specific directory on the server
filezilla.exe -close -overwrite -d filezilla.exe [://]:@/backup.tgz "D:\backups"
(taken from: http://wiki.filezilla-project.org/Comma ... _arguments)
3. Leave some time for filezilla to run, then remove the tgz from the server using cron, so give it 4 hours or something.
4. Keep the filename the same so it overwrites, then at the end of each month you could cron a unique backup.
date=`date -I` ; mysqldump -uUSERNAME -pPASSWORD ––all-databases > /home/username/public_html/backups/xbackup_$date.sql ; gzip /home/username/public_html/backups/xbackup_$date.sql; cp -dpr /home/username/public_html/ /home/username/public_html/backups ; tar -cvzf /home/username/public_html/backups/backup_$date.tgz /home/username/public_html/backups/
Notice insert of $date into the tgz filename at the end of the line
Good Luck!
1. Enter the below as one line as the cron command to run, changing usenrames and paths as appropriate
date=`date -I` ; mysqldump -uUSERNAME -pPASSWORD ––all-databases > /home/username/public_html/backups/xbackup_$date.sql ; gzip /home/username/public_html/backups/xbackup_$date.sql; cp -dpr /home/username/public_html/ /home/username/public_html/backups ; tar -cvzf /home/username/public_html/backups/backup.tgz /home/username/public_html/backups/
1. Run the above cron command at 1am each night, it will back up database and public_html directory in to a .tgz file
2. Set filezilla.exe on a scheduled job to run the next morning at 9am to download the tgz above to a local windows PC. I setup a ftp account in cPanel specifically for downloading backups from a specific directory on the server
filezilla.exe -close -overwrite -d filezilla.exe [://]:@/backup.tgz "D:\backups"
(taken from: http://wiki.filezilla-project.org/Comma ... _arguments)
3. Leave some time for filezilla to run, then remove the tgz from the server using cron, so give it 4 hours or something.
4. Keep the filename the same so it overwrites, then at the end of each month you could cron a unique backup.
date=`date -I` ; mysqldump -uUSERNAME -pPASSWORD ––all-databases > /home/username/public_html/backups/xbackup_$date.sql ; gzip /home/username/public_html/backups/xbackup_$date.sql; cp -dpr /home/username/public_html/ /home/username/public_html/backups ; tar -cvzf /home/username/public_html/backups/backup_$date.tgz /home/username/public_html/backups/
Notice insert of $date into the tgz filename at the end of the line
Good Luck!
Re: Back up Cms
This dir should not be accessible to web users (eg. www.mysite.com/backups) but only by FTP client.essexboyracer wrote: /home/username/public_html/backups/
Unfortunately FTP sends passwords in clear.
IMHO this kind of backup procedure could compromise your CMSMS security.
It can be used inside your intranet (if you trust your intranet users

Regards
blast
-
- Forum Members
- Posts: 85
- Joined: Wed Jun 20, 2007 5:40 pm
Re: Back up Cms
Good points blast, i think filezilla can use sFTP or similar, anyone any ideas on amending the above to work securely?
-
- Forum Members
- Posts: 85
- Joined: Wed Jun 20, 2007 5:40 pm
Re: Back up Cms
what about encrypting the tar archive? I did a quick search and found this
tar -c directory | mcrypt -k password > file
cat file | mdecrypt -k | tar -x (im guessing this is the decrypt command)
http://answers.google.com/answers/threadview?id=29290
I spose it would depend on having the mcrypt package installed on the shared host
tar -c directory | mcrypt -k password > file
cat file | mdecrypt -k | tar -x (im guessing this is the decrypt command)
http://answers.google.com/answers/threadview?id=29290
I spose it would depend on having the mcrypt package installed on the shared host