After install the backup plugin, I change my config.ini to this:
[cli]
dump = D:/xampp/mysql/bin/mysqldump.exe -h localhost -u (removed) -p (removed) (removed)
and then when try to backup my site I’m getting this:
This happens using any of the three backup sections (DB, Files and Code) so it not seems to be related to the mysqldump config.
I’ve removed the credentials from your post – please be careful not to post usernames/passwords! The recommended [dump] command in the plugin documentation suggests:
…in which the actual username, password, etc. will be replaced automatically. It’s best to leave it that way.
On your system, you’ll need to change /usr/bin/mysqldump for the right path. Otherwise everything should probably stay the same. I’m not sure of the best conventions for PHP under Windows, but I see from this post that you might want to try D:\\xampp\\mysql\\bin\\mysqldump.exe or D:/xampp/mysql/bin/mysqldump.exe. You might also want to try quoting the whole string with double quotes (").
When trying this, I’d also recommend checking your PHP error log to see if it indicates anything.
Regards,
Alec Smecher
Public Knowledge Project Team
That suggests that there’s a problem with the tar tool you’ve got installed. The user on the other thread had a concrete suggestion for which tar tool to install, and mentioned a couple of other libraries that were necessary. I’ve asked them to add some detail.
Regards,
Alec Smecher
Public Knowledge Project Team
I’ve checked the other thread that you suggest, but my country (Cuba) has no access to sourceforge sites. However a friend from other country helps me and downloaded the same file and put it on a different source. I’ve already installed it, and pointed my config to the new tar installed:
tar = C:/GnuWin32/bin/bsdtar.exe
and now I get this error in the log:
bsdtar.exe: Failed to open ‘\.\TAPE0’: No such file or directory
I think the issue is probably differences between the bsdtar tool you’re using and the GNU tar that OJS is intended to work with. Have you tried the gnuwin32 version of tar recommended on the other thread I linked?
Regards,
Alec Smecher
Public Knowledge Project Team
Yes, I managed to download and install the gnuwin32 version in the other thread you mentioned before, that is the one who throw me the Failed to open ‘.\TAPE0’: No such file or directory error in the log.
Ah, I see – even though that’s a GNUWin32 package, it seemingly contains BSD tar, which is slightly incompatible with the GNU tar I’m used to. Let’s see if we can adjust the backup plugin’s code so it’ll work with either variant of tar.
Try making the following change in plugins/generic/backup/BackupPlugin.inc.php.
I made the changes to the BackupPlugin.inc.php and now it makes the backup. But when I open the code-2020-07-23.tar.gz (size is 45 Mb) with the Winrar software it shows me no files, same with other software like Peazip. Is this the correct behavior?
I try again with the new code you gave me and the previous tar.exe located in c:/windows/system32 AND NOW IT WORKS!!! It makes the backup file and when opened it shows me all the files.