Jump to content
spooks

Contribution: Auto Backup Database

Recommended Posts

Hey everyone, I've been playing around on my dev site trying to get another addon to work with 2.3.3.2 and ran into a couple problems restoring a backup.

1)I received the following error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/flournet/public_html/sandbox/snuffle_upagus/includes/functions/db_backup.php on line 166

1065 - Query was empty

 

I notice line 166 is

 

$create_table_result = mysql_fetch_array($create_table_query, MYSQL_NUM);

 

And, I believe (I'm not a coder) this should be changed for 2.3.3.2 to

 

 $create_table_result = tep_db_fetch_array($create_table_query, MYSQL_NUM);

 

I've changed in my dev site and tested and now works...

 

2)When restoring, leaving the

Do you want to empty the tables sessions and whos_online (advisable when doing a complete restore, will also reset the date and file used for last restore)?
defaulted "checked"

 

It seems to be deleting these tables completely... Not emptying...

 

When I leave the box "upchecked' I receive the following error

Error: no tables selected for restore

 

Can anyone confirm???

Share this post


Link to post
Share on other sites

I am having the hardest time installing this into a 2.3.3.4 store.

I upload all of the files, overwriting the files in the store, then I run the auto_backup_setup.php

 

Afterwards, Everything looks ok, and I get the green bar across the top, however, when I try to run a new backup, I get a server error

PHP Fatal error:  Call to undefined function tep_db_fetch_array_num() in /var/www/*******/*******/backup.php on line 184, referer: http://mtrosemedia.org/*******/*******/backup.php?action=backup

 

I reverted back to my backed up copy of backup.php, but nothing runs automatically. And now, I can't backup with compression, only uncompressed.

Share this post


Link to post
Share on other sites

I tried installing in oscommerce 2.3.3.4, but it gives me errors and not updated it to this version, right?

Share this post


Link to post
Share on other sites

I'm running into the same issues as in the last 3 posts in my local install using Xampp and oscommerce v2.3.4.

I'm using what I believe is the latest version by Snoopy: http://addons.oscommerce.com/info/8902/v,23

 

When I try to restore a backup, I get the error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in xampp/mylocalstore/includes/functions/db_backup.php on line 166

So I changed the two instances of  mysql_fetch_array to tep_db_fetch_array in the db_backup.php file, but when I try to restore the backup, now I get this error:

1146 - Table 'mystore.whos_online' doesn't exist

show create table `whos_online`

[TEP STOP]

Does anyone know how to fix this and update the addon to work with v2.3.4?

@@greasemonkey and @@Snoopy10, could you guys please help out?

 

TIA! :)

 

In time: when I uncheck the "Do you want to empty the tables sessions and whos_online" box, I'm able to restore the backup.

Edited by Patty

Patty

Share this post


Link to post
Share on other sites

Hi, Question..

 

I have set auto backup every 10 minutes when i'm working in admin.  All good.

 

Set Backup delete for 200 hours, but every time it's makes a backup the last backup made of 10 minutes ago is getting deleted. ?

 

Where is the problem.

 

Greetings, Anne

Share this post


Link to post
Share on other sites

@@Patty that is as far as I've got.

 

So when you restore just be sure to leave the "who's online and sessions option" UN-checked.

 

It sounds like that works for you? It does for me.

 

Hi there. Sorry I didn't reply before, just read this now. Tks for replying.

 

It works that way, but it seems to me it's a bug that should be fixed. ;)


Patty

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

×