Auto Backup-Error on Page

Hello,
On both of our sites www.carolinaparent.com and www.charlotte parent.com, we have the auto backup plugin installed. We are getting an error on our pages and it is affecting the code on page, ex. Menu is gone. Here is the error we get:

Warning: scandir(): Directory name cannot be empty in D:\Inetpub\carolinaparent\cmsAdmin\plugins\autoBackup\autoBackup.php on line 63 Warning: Invalid argument supplied for foreach() in D:\Inetpub\carolinaparent\cmsAdmin\plugins\autoBackup\autoBackup.php on line 66

You can view his error as well by going to the domains above. We are talking to the web host but they are not much help. When I look at auto backups, it says there are none available and they were there earlier.

Thanks!
April

Re: [apdance9] Auto Backup-Error on Page

By Jason - November 19, 2010

Hi April,

I took a look at both of your domains and was unable to see the error. If you're still experiencing this problem, please fill out a [url http://www.interactivetools.com/support/]2nd Level Support Request[/url] and we can take a closer look into this issue for you.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [apdance9] Auto Backup-Error on Page

By Jason - November 19, 2010

Hi April,

The first thing we need to do is change the name of the backup folder from
D:\Inetpub\carolinaparent\cmsAdmin\data\backups_disabled_by_newtek
back to
D:\Inetpub\carolinaparent\cmsAdmin\data\backups

The way they've renamed this means that you wouldn't be able to do a manual back up or restore. After you've renamed it, check to make sure the folder still has read/write permissions. Run a manual backup from General Settings to make sure it works.

Next, If you don't want/need to keep all the backups you currently have, you can just delete them. This won't affect anything else.

Finally, we can change some code inside the plugin to have it run less frequently. By default, the backup runs once an hour, once a day, once a week, and once a month.
If you open up autoBackup.php you'll see this line of code:
// create backup files
$units = array('hourly', 'daily', 'weekly', 'monthly');


This array is used to determine which backups need to be created. By removing elements from this array, we're removing types of backups that will be created.
For example, if we only want backups run weekly and monthly, we'd change the code to look like this:
// create backup files
$units = array('weekly', 'monthly');

Daily and hourly backups won't occur.

In order to reduce the number of backup files you keep, you can change some variables up at the top. You'll see code similar to this near the top of your file:
// UPDATE THESE VALUES
$GLOBALS['AUTOBACKUP_HOURS'] = 24; // Keep automatic backups for the last X hours (max 24)
$GLOBALS['AUTOBACKUP_DAYS'] = 3; // Keep automatic backups for the last X days (max 7)
$GLOBALS['AUTOBACKUP_WEEKS'] = 3; // Keep automatic backups for the last X weeks (max 52)
$GLOBALS['AUTOBACKUP_MONTHS'] = 3; // Keep automatic backups for the last X months (max 12)


These values determine how long we want to keep old backup files before deleting them. In this exaple, we keep hourly backups for 24 hours, daily backups for 3 days, weekly backups for
3 weeks and monthly backups for 3 months. To reduce the amount of time we keep these, just reduce these numbers.

After all of this is done, reactivate your plugin. Let us know if you run into any other issues concerning this.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Auto Backup-Error on Page

Jason,

Thanks so much...I will adjust these settings and this should help us. The other thing is that when I looked at the files that the system is creating...so of them are not correct in conjunction with our domain and wondering if these are correct or if this is causing a problem. It seems like we have so many backups that seem to be incorrect/do not apply (see screenshot for list of all backups the system has created within our site). Examples: digicity.org, dkqximjkfoofkjmixqkd.charlotteparent.com, drexel.edu, evergreensuk.com, etc. Is this correct?



Thanks!

April
Attachments:

backup-screenshot.jpg 1485K

Re: [apdance9] Auto Backup-Error on Page

By Jason - November 19, 2010

Hi April,

Some of those look like they've been created when people access a subdomain (ie http://info.charlotteparent.com/). A good way to avoid this is to set a prefrix in the plugin. If you go to autoBackup.php you'll see this line:
$GLOBALS['AUTOBACKUP_DEFAULT_PREFIX'] = ''; // Backup file prefix, leave blank to use current domain name

This variable allows you to set your own file prefix. If you don't set one, it will use the current domain being used. Try this:
$GLOBALS['AUTOBACKUP_DEFAULT_PREFIX'] = 'charlotteparent.com'; // Backup file prefix, leave blank to use current domain name

This will ensure they are all named the same and that they will be removed properly. What I would do is delete any backup files that look old or just not correct. Then you can see easily if the changes you are making are making a difference.

Give that a try and let me know if you run into any issues.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/