Mysql Dump 1.0 module help

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
DA
Forum Members
Forum Members
Posts: 51
Joined: Sun Jul 30, 2006 3:56 am

Re: Mysql Dump 1.0 module help

Post by DA »

Hi Mahjong ,

No problem with the bug reporting , I want to see this working , it will help me tremendously ( smile ) . So I thank you for your perseverence on this .
---------------------------------------------
OS ; XP Pro

MySql ; 4.1.20

Admin folder permission ; 755

Backup folder permission ; 777

Modules folder permissions ; 777

MySqldump folder permissions , 755

Server is ; Linux ( not a dedicated server ) . We do not have direct access to PHP.ini , etc . We have to either ask the ISP to make changes , or use htaccess .
------------------------------------------------------

I hope this helps .

Have a good day

DA
mahjong

Re: Mysql Dump 1.0 module help

Post by mahjong »

Alpha2 is now available for further tests...

Clean install required this time:
  • Uninstall Mysql Dump from CMSMS menus (Extension->Modules->Uninstall)
  • Move or copy any backups you want to keep out of admin/backups to somewhere safe.
  • Delete the backups folder inside /admin
  • Delete the MysqlDump folder inside /modules
  • Download Mysql Dump 1.0.2 alpha 2
  • Unzip the MysqlDump folder and all its content into /modules
  • Install Mysql Dump inside CMSMS  (Extension->Modules->Install)
  • Copy the backups saved at step 2 back inside admin/backups
DA
Forum Members
Forum Members
Posts: 51
Joined: Sun Jul 30, 2006 3:56 am

Re: Mysql Dump 1.0 module help

Post by DA »

Hi Majong ,

Followed your directions and installed the latest version , etc .

Not sure if your program is supposed to install a backups folder in admin or not , but it did not . I tried doing a backup anyway , it did not work . I had to put it in manualy and I set the permissions to 777 , because 755 would not write to the backups folder .

The only warning now is the Verbose text , can not read . What ever that means .

At this stage I did not try doing a database restore . I can and will when we receive no errors . The site I am testing this on is only a new site , so it is no big deal for the next few days , even if it does screw the database ( smile ) .

---------------------------------------------------------------------
Please wait until task is fully completed

May take a few minutes with large databases.
Task started

Executing...
(username and password not displayed)

'/usr/bin/mysqldump' --user=######## --password=######## --opt --verbose --compatible=mysql40 --default-character-set=latin1 ....._cs>>backups/backup-2006-08-13_05-06-13.sql 2>../modules/MysqlDump/dump-verbose.txt

Output...

WARNING : ../modules/MysqlDump/dump-verbose.txt CANNOT BE READ
Task completed

backup-2006-08-13_05-06-13.sql... 104 b written to disk
---------------------------------------------------------------

Have a good day

DA
mahjong

Re: Mysql Dump 1.0 module help

Post by mahjong »

DA wrote:The only warning now is the Verbose text , can not read . What ever that means .
Almst there. Seems everything is working besides permissions in the modules folder.

I will change the warning for something users can actually understand. (#^_^)
DA wrote:Not sure if your program is supposed to install a backups folder in admin or not , but it did not .
Yes, it should have created admin/backups with the necessary permissions. Some minor tweaks still needed...

Could you, please, grant 0766 permissions to admin/backups and also to the modules/MysqlDump folder.

Thank you for your help.
mahjong

Re: Mysql Dump 1.0 module help

Post by mahjong »

Alpha3 is now available and hopefully it will be the last alpha release...

Same clean install procedure needed as for alpha2.
DA
Forum Members
Forum Members
Posts: 51
Joined: Sun Jul 30, 2006 3:56 am

Re: Mysql Dump 1.0 module help

Post by DA »

Hi Majong ,

Cleared every thing out as usual . Uploaded the new version , as usual . But now will not install at all , errors , as below .

Permissions on install :
Admin ; 755
Modules ; 777
Mysqldump ; 755

------------------------------------------------------------------------------------
Warning: mkdir(backups): Permission denied in /hsphere/local/home/.................../modules/MysqlDump/MysqlDump.module.php on line 71

Warning: touch(): Unable to create file backups/index.html because No such file or directory in /hsphere/local/home/......................./modules/MysqlDump/MysqlDump.module.php on line 74

Warning: chmod(): Operation not permitted in /hsphere/local/home/..................../modules/MysqlDump/MysqlDump.module.php on line 95

Warning: touch(): Unable to create file dump-verbose.txt because Permission denied in /hsphere/local/home/........................./modules/MysqlDump/MysqlDump.module.php on line 96
---------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
Next I set the permissions to ;

admin ; 777
modules ; 777
mysqldump ; 777
--------------------------------------------------------
Warning: chmod(): Operation not permitted in /hsphere/local/home/rastill/gochinasites.com/modules/MysqlDump/MysqlDump.module.php on line 95
--------------------------------------------------------------------------------------

Still no install . But only one error .

DA
mahjong

Re: Mysql Dump 1.0 module help

Post by mahjong »

??? I don't understand the behavior of your server. With permissions set to 0777, it's impossible to get those warnings, especially the one on line 95.  :-\

I've rebuild alpha3 with all PHP warnings turned off. No need to do a clean install this time. Simply unzip in modules folder.
Last edited by mahjong on Mon Aug 14, 2006 4:00 am, edited 1 time in total.
DA
Forum Members
Forum Members
Posts: 51
Joined: Sun Jul 30, 2006 3:56 am

Re: Mysql Dump 1.0 module help

Post by DA »

Hi Majong ,

First , I have two sites to play with at the moment , both sites have CMSMS beta4 , one was a complete new install of CMSMS beta4 . Now one thing I am not sure of is if I told you what version of CMSMS I am using , if it makes any difference .

Second ; The latest version will not completely install on any of them . I get an adme error , --Add Me - errorinstallfailed --

Problem ; It did install the backups folder in admin , but the owner is set at httpd , and it will not allow me to change permissions or delete , of course , I am not the owner .

The most success that I had was with alpha2 , I will try it again . I did not try it with 766 permissions . I want to send you this info first .

I need you to put alpha2 back for download so I can get it again , I deleted it off my computer by mistake . If you can do that , and then hang fire for a little bit and let me experiment a little more with it , now that I have gained some more experience also , then we will go from there .

DA
mahjong

Re: Mysql Dump 1.0 module help

Post by mahjong »

what version of CMSMS I am using , if it makes any difference
It doesn't matter. You cannot even initiate the installation procedure with earlier builds, so I'm sure you are using one of the recent 1.0betas.
I get an adme error , --Add Me - errorinstallfailed --
Don't worry about that. It's a bug in the CMSMS handler of modules. It has been corrected in the svn. The patch will be applied on the next release of CMSMS. Until then, I've added a bypass in Mysql Dump alpha4.
I need you to put alpha2 back
Instead, I've published alpha4 with switches to make it behave like alpha2. At the beginning of the MysqlDump.module.php file, you'll find :

Code: Select all

class MysqlDump extends CMSModule {
	
/****** CONFIGURATION *****/
	
	// set to true if you want to disable checks on install (default = false)
	var $no_checks_on_install = false;        

	//Turns off additional info on execution (default = false)
	var $safe_mode = false;

	//Folder where to backups will be created under admin/ (default = backups)
	var $backupDirectory = 'backups';

If you set $no_checks_on_install to true, the installator will work like alpha2's.

Set the permissions to 0777 in admin/backups and modules/MysqlDump and file modules/MysqlDump/dump-verbose.txt
DA
Forum Members
Forum Members
Posts: 51
Joined: Sun Jul 30, 2006 3:56 am

Re: Mysql Dump 1.0 module help

Post by DA »

Hi Mahjong ,

IT WORKS ( smile ) . No errors . Doing a dump , or re-installing the data base .

Up loaded the new version , as per usual to modules . I did not edit MysqlDump.module.php as you suggested " If you set $no_checks_on_install to true, the installator will work like alpha2's. " . I changed nothing , except the permissions .

Quote ; " Set the permissions to 0777 in admin/backups and modules/MysqlDump and file modules/MysqlDump/dump-verbose.txt "

With the permissions , I could not change them on the backups folder as I said before , it is owned by phpd . Permissions on it are 744 .

I tried the permissions of 766 as you said with a previouse version , but on this it did not work , only 777 . I did not try different combinations of 777 and 766 . The only reason I tried this was for security reasons .

It all seems to be working fine , all we need now is some way of exporting the data base backup . Because of the phpd ownership , I can not even view what is in the backups folder , therefore I can not copy the backup .

Well done mahjong , it is damn simple to install and use .

DA
mahjong

Re: Mysql Dump 1.0 module help

Post by mahjong »

I can not even view what is in the backups folder , therefore I can not copy the backup .
Yes, you can...

Don't click to fast on the Return button after producing a backup. Look at the bottom of the page :
Task completed

[url=http://backup-YYYY-MM-DD_HH-mm-ss.sql]backup-YYYY-MM-DD_HH-mm-ss.sql[/url]... 469 kb written to disk
You can right-click the link and do Save as...

The list of backups is displayed in the Mysql Dump's Delete Dataset tab.
You can fetch them at http://yourserver/admin/backups/backup-YYYY-MM-DD_HH-mm-ss.sql

But this gives me a idea of another improvement for next version...
Well done mahjong , it is damn simple to install and use .
Thank for your help. I couldn't have done it alone.
Last edited by mahjong on Tue Aug 15, 2006 3:59 am, edited 1 time in total.
DA
Forum Members
Forum Members
Posts: 51
Joined: Sun Jul 30, 2006 3:56 am

Re: Mysql Dump 1.0 module help

Post by DA »

Hi Mahjong ,

Thanks once again for doing this program , it helps me immensely . No thanks needed at all , I had an ulteria motive ( smile ) , I wanted it .

Also thanks for telling me how to save my backups , maybe I would have figured it out some time in the future .

Now , without pressing to much , do you think you could add in Auto Backup by date and time , maybe ?

Once again , thanks very much .

Can you keep me posted on your new versions etc ?

Have a good day .

DA
mahjong

Re: Mysql Dump 1.0 module help

Post by mahjong »

do you think you could add in Auto Backup by date and time , maybe ?
Sorry. I don't think I'll ever add a scheduled backups functionnality since that kind of automation is best left in the hand of professionnals having full control over the server. If not, too much trouble can arise. If you need automated backups, you'll need to use a shell/cron script like AutoMySQLBackups.
Can you keep me posted on your new versions etc ?
All the developments of Mysql Dump are reported in CMSMS Forge and here, on the modules/Add-Ons board. Also, official releases are listed in CMSSM, by the module manager (Extensions->Module Manager->M)

Have fun!
DA
Forum Members
Forum Members
Posts: 51
Joined: Sun Jul 30, 2006 3:56 am

Re: Mysql Dump 1.0 module help

Post by DA »

Hi Mahjong ,

Just tried your newer 1.1 beta version and have a problem . It installs fine , but will not write a backup to the backups folder .
Problem being , because I can not change the permissions on the backupsfolder , because it is owned by " httpd " , also I can not delete it because of this fact of ownership .

-----------------------------------------------------------------------
Mysql Dump
Please wait until task is fully completed

May take a few minutes with large databases.
Task started

Executing...
(username and password not displayed)

'/usr/bin/mysqldump' --user=######## --password=######## --opt --verbose --compatible=mysql40 --default-character-set=latin1 ........>>backups/backup-2006-08-16_08-55-14.sql 2>../modules/MysqlDump/dump-verbose.txt

Output...

/usr/bin/mysqldump: ERROR: unknown variable 'compatible=mysql40'

Task completed

ERROR : backups/backup-2006-08-16_08-55-14.sql MISSING or EMPTY
--------------------------------------------------------

DA
Post Reply

Return to “Modules/Add-Ons”