Jump to content
spooks

Contribution: Auto Backup Database

Recommended Posts

I have the 4.1 version of auto backup installed. When I log into the admin, sometimes I get an error:

 

WARNING: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/XXXX/includes/auto_backup_delete.php:111) in /home/XXXX/public_html/XXXX/includes/functions/general.php on line 34

 

My auto backup settings are as follows:

 

Auto Backup Interval- 120

 

Backup Archive Interval- 24

 

GZip Backups- gzip

 

Split Backups On Timeout- extend

 

Auto Backup Displayed Time Format- true

 

Auto Run Auto Backup Delete- true

 

Email Cron Backups- false

 

Backup Delete Interval- 2

 

Please help.

Share this post


Link to post
Share on other sites

@ That's saying you getting a problem at the point it is writing to the removed_backup.log file, is that file being created in your backup folder and is it being updated when the backup delete is run (by your settings it should be less than 2 days old)

 

If that file has got write protected, that could cause the problem.


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.

Share this post


Link to post
Share on other sites

@

 

That should be OK, could you check your server error log and see if that sheds any light.

 

When you get the headers already sent do you see what's output? Sometimes you have to use view source & look at the start of the page to see.

 

PS Whats the age of the file?

Edited by spooks

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.

Share this post


Link to post
Share on other sites

The "removed_backup.log" file is being updated. So there is no problem regarding the accessibility. But I still cannot figure out the problem.

This problem has been comming up only after I updated the auto backup.

Just a thought, did the previous version had some modifications to be done to the general.php file?

Share this post


Link to post
Share on other sites

@

 

modifications to be done to the general.php

 

yes, but only for the GZip function, which is now integral, your problem is with the Auto Backup Delete module which is new in this version.

 

If the cause (warning or notice) can't be traced the simplest solution is to set Auto Run Auto Backup Delete to false, then if you still want that option, run it as a cron job, which is the intended method anyway.


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.

Share this post


Link to post
Share on other sites

Uploaded Auto Backup Database V4.2 with additions by Modem 2.0, thanks :thumbsup:

  • Added an option to the shop backoffice to enable/disable the automatic database backup.
  • Modified email function to widen server compatibility
  • Fixed a small typo error in /admin/includes/mail_backups.php to as mentioned before.

If upgrading you will need to edit application_top.php as per the latest install to use the new setting.


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.

Share this post


Link to post
Share on other sites

Hi spooks,

Just for your information, I have updated my auto backup version and now I am not facing any issues regarding the Auto Backup Delete feature! Thank you... :)

Share this post


Link to post
Share on other sites
not facing any issues regarding the Auto Backup Delete feature!

 

Glad of that, perhaps your original issue was just a corrupt download :shifty:


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.

Share this post


Link to post
Share on other sites

Hi! Great add-on! I'm one of those people who never remember to back anything up, so this is going to be a *major* functionality for me!

 

I'm having one little problem, though... My server just ran the first cron job backup and dropped a backup.log file in the backup directory. The log file contains the following warnings:

 

X-Powered-By: PHP/5.3.10
Content-type: text/html
<br />
<b>Warning</b>:  date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in <b>/home/chris400/public_html/crazychris.ca/store/storeadmin/includes/languages/english/auto_backup.php</b> on line <b>48</b><br />
<br />
<b>Warning</b>:  date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in <b>/home/chris400/public_html/crazychris.ca/store/a/includes/auto_backup_db.php</b> on line <b>118</b><br />
Auto Backup
Cron Job Run 31st May 2012 00:00
<br />
<b>Warning</b>:  strtotime() [<a href='function.strtotime'>function.strtotime</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in <b>/home/chris400/public_html/crazychris.ca/store/admin/includes/auto_backup_db.php</b> on line <b>143</b><br />
<br />
<b>Warning</b>:  strtotime() [<a href='function.strtotime'>function.strtotime</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in <b>/home/chris400/public_html/crazychris.ca/store/admin/includes/auto_backup_db.php</b> on line <b>144</b><br />
No backup made. Last backup made less than 20 mins ago.

 

I have no idea if this is a problem with Auto Backup, cron, or my server settings. Any guidance you can provide would be greatly appreciated!

 

Thanks!

 

Regards,

 

Chris

Share this post


Link to post
Share on other sites

Hi! Great add-on! I'm one of those people who never remember to back anything up, so this is going to be a *major* functionality for me!

 

I'm having one little problem, though... My server just ran the first cron job backup and dropped a backup.log file in the backup directory. The log file contains the following warnings:

 

X-Powered-By: PHP/5.3.10
Content-type: text/html
<br />
<b>Warning</b>:  date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in <b>/home/chris400/public_html/crazychris.ca/store/storeadmin/includes/languages/english/auto_backup.php</b> on line <b>48</b><br />
<br />
<b>Warning</b>:  date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in <b>/home/chris400/public_html/crazychris.ca/store/a/includes/auto_backup_db.php</b> on line <b>118</b><br />
Auto Backup
Cron Job Run 31st May 2012 00:00
<br />
<b>Warning</b>:  strtotime() [<a href='function.strtotime'>function.strtotime</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in <b>/home/chris400/public_html/crazychris.ca/store/admin/includes/auto_backup_db.php</b> on line <b>143</b><br />
<br />
<b>Warning</b>:  strtotime() [<a href='function.strtotime'>function.strtotime</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in <b>/home/chris400/public_html/crazychris.ca/store/admin/includes/auto_backup_db.php</b> on line <b>144</b><br />
No backup made. Last backup made less than 20 mins ago.

 

I have no idea if this is a problem with Auto Backup, cron, or my server settings. Any guidance you can provide would be greatly appreciated!

 

Thanks!

 

Regards,

 

Chris

 

I'm bumping this because I'm still having this problem. The backups do work, but I keep getting these error messages every day, and it's bugging the heck out of me.

 

Any help in solving this would be greatly appreciated.

 

Thanks!

 

Regards,

 

Chris

Share this post


Link to post
Share on other sites

My store is havily modified,

 

The addon is insatalled and working, however.

 

The addon tells me i have 72 tables for backup. My SQL Server says 74.

 

Hence when i restore form backup im missing things.

 

How to edit the addon to catch all...?

 

IE. the backups are not backing everything up.

 

Any ideas??

Share this post


Link to post
Share on other sites

My store is havily modified,

 

The addon is insatalled and working, however.

 

The addon tells me i have 72 tables for backup. My SQL Server says 74.

 

Hence when i restore form backup im missing things.

 

How to edit the addon to catch all...?

 

IE. the backups are not backing everything up.

 

Any ideas??

 

Solved the issues - I see two tables -"who´s online and sessions".....

 

Nevermind - thanks all

Share this post


Link to post
Share on other sites

I don't know if this has been brought up, but I think there's a slight error that occurs when the database backup is created.

 

If a postal code begins with a zero, that zero gets ignored. Any way to fix this?

Share this post


Link to post
Share on other sites

Hi Sam,

i was wondering if i might get some inforamation on cron jobs and the emailed files...

the cron is setup and working and it is emailing the cron job and the .gz file is 34 Kb but the .sql when i unzip it is empty 0KB

Share this post


Link to post
Share on other sites

I have installed the latest version of Autobackup

 

From the backup_db.php file: auto_backup_db.php, v 4.3 21/01/2013

 

When I went to restore from a backup that was made with this program it failed every time, I tried individual tables etc, but everything failed to restore. I downloaded the backup and tried to restore using phpmyadmin and found that it was failing because of an extra comma at the end of the VALUE data items. I noticed it was in every data item, so using a simple replace ",)" with ")" thruout the entire backup file allowed the data to be restored without any errors. Here is a sample of a table with the extra information.

 

drop table if exists `categories_description`;

CREATE TABLE `categories_description` (

`categories_id` int(11) NOT NULL DEFAULT '0',

`language_id` int(11) NOT NULL DEFAULT '1',

`categories_name` varchar(32) NOT NULL,

PRIMARY KEY (`categories_id`,`language_id`),

KEY `idx_categories_name` (`categories_name`));

 

insert into `categories_description` (`categories_id`, `language_id`, `categories_name`) values (1,1,'Hardware',), (2,1,'Software',), (3,1,'DVD Movies',), (4,1,'Graphics Cards',), (5,1,'Printers',), (6,1,'Monitors',), (7,1,'Speakers',), (8,1,'Keyboards',), (9,1,'Mice',), (10,1,'Action',), (11,1,'Science Fiction',), (12,1,'Comedy',), (13,1,'Cartoons',), (14,1,'Thriller',), (15,1,'Drama',), (16,1,'Memory',), (17,1,'CDROM Drives',), (21,1,'Gadgets',);

 

I looked thru the php code and found where the code was supposed to remove an extra comma, but I am not sure if that is the problem. If you have a fix please let me know.

 

Bill V

Share this post


Link to post
Share on other sites

Hello,

 

I switched from Auto mysql backup (http://addons.oscommerce.com/info/3100) to Auto Backup Database to benefit from the automated e-mail function.

 

Now I have two questions:

  1. Can I use the automated e-mails if I don't have a cron job installed to generate database backups (unfortunately, my hosting provider doesn't offer cron jobs)?
  2. Do I need an e-mail account from my own hosting provider or can I use any account to send these e-mails (again, my hosting provider doesn't offer SMTP for the accounts related to my domain)?

Kind regards,

 

Dennis

Share this post


Link to post
Share on other sites

Hi Spooks,

 

 

great addon, but mine is making a backup every minute !!! while i am working in the admin.

 

Regards

Kozak

Share this post


Link to post
Share on other sites

25 backups in 40minutes, that's TOO MUCH.

Where can I change the interval?

 

regards

Kozak

Edited by kozak

Share this post


Link to post
Share on other sites

Hi!

 

Thank you for this contribution, it works fine.I could not set up the CRON job yet because

 

in catalog/admin/backups/backup.log it says:

Fatal error: Call to undefined function mysql_connect() in /[...]/admin/includes/functions/database.php on line 19

 

I have OSC 3.3.4, Apache/2.2.14, PHP 5.3.2

 

How can I fix this?

 

Thank you in advance for helping.

 

Regards

Martin

Share this post


Link to post
Share on other sites

I fixed the problem by slightly changing the code so I don't neet a cronjob. I had to change

catalog/admin/includes/auto_backup_db.php around line 295 from

if (BACKUP_MAIL_CRON == 'true' &&  $cron ) include(DIR_WS_INCLUDES . 'mail_cron_backups.php');

to

if (! ($at_info->diff < ($at_archive * 60) && $at_info->last < ($at_archive * 60) && $at_info->ref <> ''))
 {
 if (BACKUP_MAIL_CRON == 'true') include(DIR_WS_INCLUDES . 'mail_cron_backups.php');
 }

So now the backup comes by mail without cron.

Share this post


Link to post
Share on other sites

Important update of

 

Auto Backup Database (Updated) from spooks to make it compatible with Oscommerce 2.3.3.2.

 

New features of the new version 4.3:

Changed files: auto_backup_db.php, backup.php, admin/includes/functions/database.php

  • Adaptation to Oscommerce Ver. 2.3.3.2
  • Made database requests compatible with php 5.5 and backwards compatible with older php versions.

Note: This version can be installed only if Oscommerce 2.3.3.2 is installed.

The update is attached. AutoBackupV4.3.zip

 

Regards,

 

Bernhard Bauer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×