Jump to content



Photo
* * * * * 1 votes

[Contribution] Database Manager


  • Please log in to reply
112 replies to this topic

#41 ONLINE   Jan Zonjee

Jan Zonjee

    Governor of Peace

  • Core Team
  • 7,095 posts
  • Real Name:Jan Zonjee
  • Gender:Male
  • Location:the Netherlands

Posted 18 February 2009 - 07:35

It show this error message "compression tooling '/usr/bin/gzip' not found" on the page when i press on the backup button on the backup website area.

Either the path set in LOCAL_EXE_GZIP (I think it is in application_top.php) is wrong or you can't use it at all because it is not there. The contribution also can use it's own files for gzipping a file. It is in there as a function.

#42   lightshine

lightshine
  • Members
  • 36 posts
  • Real Name:Lightshine
  • Location:Singapore

Posted 18 February 2009 - 10:05

Either the path set in LOCAL_EXE_GZIP (I think it is in application_top.php) is wrong or you can't use it at all because it is not there. The contribution also can use it's own files for gzipping a file. It is in there as a function.

Could you please show me how to do it? Thank you!

#43   lightshine

lightshine
  • Members
  • 36 posts
  • Real Name:Lightshine
  • Location:Singapore

Posted 20 February 2009 - 06:19

Either the path set in LOCAL_EXE_GZIP (I think it is in application_top.php) is wrong or you can't use it at all because it is not there. The contribution also can use it's own files for gzipping a file. It is in there as a function.

I'm a newbie in php and osc. Could you please show me how to code using the gzip function to zip up the entire catalog/shop site to a file? Which would enable us to download the site for backup as well.
This is what i have tried so far but it does not work properly as shown below. When i click on the backup button, it only return a very small file size which should not be the case!
case 'backupfilesnow':
		tep_set_time_limit(0);
		$backup_file = 'files_' . date('YmdHis') . '.gz';
		if (@file_exists(LOCAL_EXE_GZIP) && $safe_mode_setting == false) {
		  exec('tar -cjf ' . DIR_FS_BACKUP . $backup_file . ' ' . DIR_FS_DOCUMENT_ROOT . ' --exclude=\'*.gz\' ' . DIR_FS_BACKUP);
		  header('Content-type: application/x-octet-stream');
		  header('Content-disposition: attachment; filename=' . $backup_file);
		  readfile(DIR_FS_BACKUP . $backup_file);
//		unlink(DIR_FS_BACKUP . $backup_folder_file);
		  unlink(DIR_FS_BACKUP . $backup_file);
		} elseif (@function_exists('gzwrite')) {
			$gzip_result = osc_gzip (DIR_FS_BACKUP, $_GET['file'], false);
			
			if (!$gzip_result) {
			$messageStack->add_session(ERROR_ON_GZIP, 'error');
				tep_redirect(tep_href_link(FILENAME_BACKUP, $listing_link));
				exit;
			}
		} else {
		  //$messageStack->add_session('compression tooling \'' . LOCAL_EXE_GZIP . '\' not found', 'error');
		  $messageStack->add_session(ERROR_NO_GZIP_AVAILABLE, 'error');
		  tep_redirect(tep_href_link(FILENAME_BACKUP, $listing_link));		 
		  exit;
		}
		break;

Edited by lightshine, 20 February 2009 - 06:21.


#44   ifccnb

ifccnb
  • Members
  • 19 posts
  • Real Name:Manny
  • Gender:Male

Posted 27 February 2009 - 08:22

Hello, I installed your contrib and seems to work fine, thanks. I just had a question... in the contrib file you included some screen shots. I have never seen this screen when I perform a restore.

This is not a nitpick lol. I was just wondering because it looks cool.

[img]http://www.pagesworldbanknotes.com/zweb_images/screenshot_reload_backup.gif[/img]

#45   Coopco

Coopco
  • Members
  • 9,557 posts
  • Real Name:Leslie Cooper
  • Gender:Male
  • Location:Sea Lake, Victoria, Australia

Posted 03 October 2009 - 13:36

Hi Jan

I have this contribution installed and am in the process of doing the updates to RC2a. I am up to the MySQL 5.0 Strict Mode compatibility updates and Update database backup and restoration.

Do you think it is worthwhile doing these?


The Coopco Underwear Shop



If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

#46 ONLINE   Jan Zonjee

Jan Zonjee

    Governor of Peace

  • Core Team
  • 7,095 posts
  • Real Name:Jan Zonjee
  • Gender:Male
  • Location:the Netherlands

Posted 03 October 2009 - 13:52

I have this contribution installed and am in the process of doing the updates to RC2a. I am up to the MySQL 5.0 Strict Mode compatibility updates and Update database backup and restoration.

Do you think it is worthwhile doing these?

Not for the database manager if you installed this one. As far as I recall those fixes should be in there or not needed.

#47 ONLINE   Jan Zonjee

Jan Zonjee

    Governor of Peace

  • Core Team
  • 7,095 posts
  • Real Name:Jan Zonjee
  • Gender:Male
  • Location:the Netherlands

Posted 03 October 2009 - 13:56

I just had a question... in the contrib file you included some screen shots. I have never seen this screen when I perform a restore.

This is not a nitpick lol. I was just wondering because it looks cool.

Never saw your post, sorry. You would only see this if the backup you had to make would come close to the maximum execution time of a PHP script (so the command to extend the maximum time to indefinitely would not be allowed on your server too). Then the backup would happen in several "passes" and this is a screen that shows the progress so far.

#48   Coopco

Coopco
  • Members
  • 9,557 posts
  • Real Name:Leslie Cooper
  • Gender:Male
  • Location:Sea Lake, Victoria, Australia

Posted 03 October 2009 - 14:26

Not for the database manager if you installed this one. As far as I recall those fixes should be in there or not needed.

Fantastic, thanks Jan.


The Coopco Underwear Shop



If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

#49   Milierkovic

Milierkovic
  • Members
  • 10 posts
  • Real Name:Vincent
  • Gender:Male
  • Location:Netherlands

Posted 09 October 2009 - 15:49

Hello Jan Zonjee,

First of all thanks for your contribution.

I have a question, i am following the "How to secure your site" thread: http://forums.oscomm...cure-your-site/

It states here and i quote "I recommend you use AutoBackup Database in Admin AND Database backup manager also Backup of all store files in zip format. "

Now i happen to have installed Auto Backup Install V3.0 and in this contribution i had to edit "admin/includes/languages/english/backup.php"
5. In /admin/includes/languages/english/backup.php

find:

define('ERROR_BACKUP_DIRECTORY_DOES_NOT_EXIST', 'Error: Backup directory does not exist. Please set this in configure.php.');

replace with:

define('ERROR_BACKUP_DIRECTORY_DOES_NOT_EXIST','Error, Backup Directory Does Not Exist, please create it or run "auto_backup_setup.php"');

Now in your contribution i have to upload a new admin/includes/languages/english/backup.php file, but this does not have the change in it anymore
for the Auto Backup Install V3.0 to work.

Is it safe just to change this line again after i uploaded your admin/includes/languages/english/backup.php file?

Or can this cause mailfunctioning?

Thanks

Edited by Milierkovic, 09 October 2009 - 15:50.


#50   spooks

spooks
  • Members
  • 7,017 posts
  • Real Name:Sam
  • Gender:Male
  • Location:UK

Posted 09 October 2009 - 15:56



Its just a language file, you are just defining what it says if there is a error, it could say anything u like.

Changing it will not effect the operation of either app.
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#51 ONLINE   Jan Zonjee

Jan Zonjee

    Governor of Peace

  • Core Team
  • 7,095 posts
  • Real Name:Jan Zonjee
  • Gender:Male
  • Location:the Netherlands

Posted 09 October 2009 - 15:56

Now in your contribution i have to upload a new admin/includes/languages/english/backup.php file, but this does not have the change in it anymore
for the Auto Backup Install V3.0 to work.

Is it safe just to change this line again after i uploaded your admin/includes/languages/english/backup.php file?

Or can this cause mailfunctioning?

The purpose of the language files is just to be able to use different languages with one "code" file so you seldom get errors with changes in language files. You should be safe changing this line again in the language file that came with the contribution.

#52   Milierkovic

Milierkovic
  • Members
  • 10 posts
  • Real Name:Vincent
  • Gender:Male
  • Location:Netherlands

Posted 09 October 2009 - 16:01

Thanks for your quick answers,

I asked this question just to be sure, but now i see it cant do any damage, it works good, i tested it.

better safe then sorry /smile.gif' class='bbc_emoticon' alt=':)' />

#53   dadada

dadada
  • Members
  • 19 posts
  • Real Name:.
  • Gender:Male

Posted 18 February 2011 - 21:31

Hello Jan,
That's really really a great addon for osCommerce. Thanks for your time, idea and your perfect effort.

I have some questions:

-Do you think to update this addon for osCommerce v2.3.x (ereg_replace, template_top.php , template_bottom.php etc...)?
-Do you think to develop the script as AutoBackup Script with some available options like:
***AutoBackup DB ( 1-24 hourly, daily, weekly, monthly)
***Delete backup archives [older than specified days]
***Restore base from last backup archive [matching specified regexp]
***Create back up archives [from specified table(s)]\n\n". [table1 table2...]\n".
-Including BigDump and XT-Dump(I can't find) updates.

I will need to use this addon with some extra options. I think to start to develop but, I can't find XT-Dump on the Web.

Thanks.

#54   dadada

dadada
  • Members
  • 19 posts
  • Real Name:.
  • Gender:Male

Posted 08 March 2011 - 19:33

Hello Jan,

I've tested this class: http://www.phpclasse...iple-files.html
That's not a good solution. That has a problem with null and empty inputs ''. But like "idea" really it's very good.
I didn't find the new version or documentation for XT-Dump. Because there is no site of the creator : http://dreaxteam.free.fr/ now.
I also found a bug (and maybe in osC v2.3.1.- I didn't check) in your addon with my mysql partitions (partition option of mysql).

Thanks.

Edited by faaliyet, 08 March 2011 - 19:41.


#55 ONLINE   Jan Zonjee

Jan Zonjee

    Governor of Peace

  • Core Team
  • 7,095 posts
  • Real Name:Jan Zonjee
  • Gender:Male
  • Location:the Netherlands

Posted 08 March 2011 - 22:33

I've tested this class: http://www.phpclasse...iple-files.html
That's not a good solution. That has a problem with null and empty inputs ''. But like "idea" really it's very good.

Never seen it and I the site didn't open this moment so it will have to wait.

I didn't find the new version or documentation for XT-Dump. Because there is no site of the creator : http://dreaxteam.free.fr/ now.

True, but a newer version I saw can be found here.

I also found a bug (and maybe in osC v2.3.1.- I didn't check) in your addon with my mysql partitions (partition option of mysql).

I don't know what you mean with that. Please clarify what you mean with mysql partitions (haven't googled for it).

#56 ONLINE   Jan Zonjee

Jan Zonjee

    Governor of Peace

  • Core Team
  • 7,095 posts
  • Real Name:Jan Zonjee
  • Gender:Male
  • Location:the Netherlands

Posted 08 March 2011 - 22:38

I have some questions:

-Do you think to update this addon for osCommerce v2.3.x (ereg_replace, template_top.php , template_bottom.php etc...)?

Haven't written a line of code in months. Too busy and too lazy.

-Do you think to develop the script as AutoBackup Script with some available options like:
***AutoBackup DB ( 1-24 hourly, daily, weekly, monthly)

As far as I know "spooks" already did an auto-backup contribution.

-Including BigDump and XT-Dump(I can't find) updates.

BigDump was very recently uploaded I think (Restore Database with Browser). Haven't looked at updates of those two.

#57   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,344 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 09 March 2011 - 00:34

mysqldumper does a great job of backing up and restoring large databases. Backups can run manually or from a CRON job. It's free/open source of course.

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price in Cart Only/MAPP Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support
Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#58   dadada

dadada
  • Members
  • 19 posts
  • Real Name:.
  • Gender:Male

Posted 09 March 2011 - 12:53

mysqldumper does a great job of backing up and restoring large databases. Backups can run manually or from a CRON job. It's free/open source of course.

Regards
Jim


Thanks Jim !
I just saw the screenshots of mysqldumper and that looks perfect. I'm gonna check this out.
That's really a great job ! Awesome !
Thanks in advance for your message !!!

#59   spooks

spooks
  • Members
  • 7,017 posts
  • Real Name:Sam
  • Gender:Male
  • Location:UK

Posted 16 March 2012 - 00:17

Uploaded New Version 1.5 (Complete Package)

Modified layout for 2.3.x,
Moved & modified download function,
Added download(display) plus deletion of log files if found in folder,
Added ability to email backup files,
Replaced any depreciated functions.
A few other minor display modifications.

This version is also compatible with osC 2.2 and lower

Log files are produced by Auto Backup Database ( http://addons.oscommerce.com/info/8374 )
which will create automatic backups periodically that are compatible with Database Backup Manager.
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#60   mr_absinthe

mr_absinthe
  • Members
  • 447 posts
  • Real Name:Alex
  • Location:London, UK

Posted 16 March 2012 - 09:53

That was quick! /thumbsup.gif' class='bbc_emoticon' alt=':thumbsup:' />
The file size that I tried to email is 9.28MB and I'm receiving the following error:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 13150833 bytes) in /home/xxx/zzz/admin/includes/classes/class.smtp.php on line 368
Absinthe Original Liquor Store