Hi Oliver. Thanks for reporting the trouble you're having with the database utility.
This utility is something that has been developed while being posted in the open forum. As you can see from the thread, although it was working for me on my own systems, my first draft didn't even work right for the very first person who tried it! I have updated the code several times since it was originally posted: responding to troubles on different systems, adding features, fixing bugs.
So the first thing is that if you're using a version of this utility that was downloaded more than a few weeks ago (since April 12), get a new copy of the download
. But I guess you probably didn't download this a few months ago and wait until now to try it.
Let's start by taking these two together:
"Save a Backup" on the server: ok
"Download a Backup" on server: The file created is empty
Creating empty files was one of the very first problems I ran into. This was caused by having the wrong path to the system's mysql commands. The config.php
file was meant to address the problem. It discovers the correct path and as a fallback allows you to hard code the path to the system's mysql files.
But downloading files and saving them on the server both use the same command path. If one works, then the other should as well. So I'm left scratching my head. The code does include several layers of error reporting. Were there any errors reported?
Next, these two are probably related:
"Save a Backup" on local WAMPP installation: No File is created
"Download a Backup" on local WAMPP installation: The file created is empty
@KK tried using my code on a project of his own and discovered that it wasn't working on his Windows system. He shared his corrections with me and I incorporated them into this project. The thing is, I'm strictly an amateur at this. I don't even have a Windows computer for testing. I did ask a couple of the Couch forumites to test the code for me, and they reported it was working. So that's about as much as I know about that.
Again, I think this comes down to the paths to the system's mysql commands being malformed. If you're using the latest version of the utility, you should be getting error reports along with or instead of these errors. You might want to look into hard coding the system paths in the config.php
file if you can figure out the correct path.
Another thing to look at is what the utility reports as the file path. When you save a backup, you should get a message that says "Database backup saved to path/to/couch/database/backups/DBNAME_2016-05-10_114153.sql". Check that path name. You might find some obvious error.
At this point, I'm kind of stumped because I can't reproduce or test the errors you're experiencing. But I have no doubt that they're real. Since this utility relies on system commands rather than php functions, I've learned that there are lots of ways for different system and server configurations to cause problems.
You're right that this is a very useful tool. I'm glad to have it for myself, especially with the cron job files that are included. And @KK was kind enough to pin it among the featured Tips and Tricks threads because backing up database files is such an important part of managing a website. But getting it to work across all different systems and server configurations has been more of a challenge than I ever expected.
I may have gotten in over my head, so I welcome input from any other users or developers who think they can help make this utility more stable and functional across different systems. Input from some of the more savvy programmers in the community might be needed to really get this working for everyone.
As for your own issues, be sure that you have downloaded the most recent version, and let me know if there are any errors being reported or the path names look malformed. I honestly appreciate your feedback and hope we can get this working for you.
All the best,