Sign up |
I have purchased some mounted backup space from my hosting provider. There is now a directory in the absolute root of my VPS called "backups" and I would like to be able to store the backups that my autoBackup plugin script takes to this mounted location. I think I have found the line of code (Line 23) that defines the default location of the backups:
$GLOBALS['AUTOBACKUP_DIR'] = realpath(DATA_DIR .'/backups');
I have tried changing this to be as follows but it is not working:
$GLOBALS['AUTOBACKUP_DIR'] = realpath($SERVER['DOCUMENT_ROOT'] . '/backups');
I am not sure if that is because the DOCUMENT_ROOT is not actually the same as the server root. Perhaps I should change this to be as follows:
$GLOBALS['AUTOBACKUP_DIR'] = realpath('ROOTPATH' . '/backups');
Any advice would be appreciated.
Also, is there any way I can manually run the backup script because currently I can only test once per hour?!
If you really mean that the storage is at the 'root; of the vps the path would be only '/backups' if you ssh in as root and do 'cd /backups' and that lands you in the spot then that is the right path. Problem may arrive if you do not have permission for web scripts to go outside the base directory .. google 'php open_basedir' for more information.
If you have changed the backup directory setting in the admin option > General Settings > Backup & Restore should be pointing to where you redirect the backups.
My bad manual backup seems to be pretty much hardcoded .. not to same spot as auto.
You can't run the autobackup the way you are trying, if I am reading the code right, simply delete the files in /backups and load cmsBuilder and it will do it again, it seems to check if the files are there and if they need refreshing will re-do.
Just wanted to jump in here and let anyone else following along that we've taken this into consulting as it looks like the change needs to be hardcoded into the plugin. I'll update the thread again once we've had a chance to think this one through.
Just sent you an email but wanted to update the thread as well.
Auto Backup 1.04 will be released next week and fixes the handling of custom autobackup directory.
When it is available, it can be downloaded under "My Pruchases" here:
Thanks again for bringing this to my attention.