I saw your issues with special characters (there are three). I have plans to change that and see if that works.
After removing all special characters, this works just fine.
speaking of special characters.....
if your admin directory has any special characters, it seems that the following change is necessary (for backing up... around line 133):
it may be worth wild to change all instances of DIR_FS_BACKUP to $backup_directory and define said var at the beginning of the script as such:PHP Code:
//from
$dump_params .= ' "--result-file=' . DIR_FS_BACKUP . $backup_file . '"';
//to
$dump_params .= ' "--result-file=' . escapeshellcmd(DIR_FS_BACKUP) . $backup_file . '"';
but alas, i do not have the time or inclination at this moment for further testing.PHP Code:
$backup_directory = escapeshellcmd(DIR_FS_BACKUP);
Since I have modified this to death over the years, I've set up a new repository based on this plugins history to be able to add in changes at some point.
So please add this link to the plugin page for reporting issues:
https://github.com/torvista/Zen_Cart-Backup_MYSQL_Plugin
Steve
github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto, Product Listing Sorter...
When doing a backup->Download without storing on server, I note that
- a dumpfile is created, ok
- a download window opens, ok
- the download occurs, ok
- another dumpfile is created, NOT ok.
After the header-exit, it seems to be re-running the same page using action backupnow, but despite my efforts I can't stop it.
Consequently every time I take a backup snapshot from the hosting for local use, it leaves behind 300Mb of debris which I need to delete manually.
(In my modified version of this plugin, the original dumpfile is unlinked after download, but still, a new one is created as per the plugin version)
Steve
github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto, Product Listing Sorter...
Damn...now I suppose I'll have to do something with it!
Given the absence of comments here and there, looks like it is rarely used...I use it constantly.
Steve
github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto, Product Listing Sorter...
Thanks folks.
Also note that since some hosters are allergic to this script, so you may have to resort to another option for building a backup.
You can use cPanel backup or backup via phpMyAdmin as noted in the documentation.
https://docs.zen-cart.com/user/runni...-your-database
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
I suppose the problem is in the use of exec.
I'd also point out my use case is I don't use this for production backups, that's a separate automated process.
I use this as a dev tool, to get a copy of production db for use locally, usually to test imports first, or to test install scripts/do repeated restores: much easier to in the admin than elsewhere. Invaluable in that respect.
Steve
github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto, Product Listing Sorter...
Bookmarks