'Simple Backup' Add-on for testing

Permalink 1 user found helpful
If anyone would be willing to test a free add-on, one is attached.

Interim documentation is at:
https://www.concrete5.org/marketplace/addons/back-up-files...

The 'backup database' job hasn't gone through the PRB yet (I'm having some difficulty in contacting them), but the 'backup files' job has passed.

Comments welcome!

1 Attachment

Gondwana
 
JohntheFish replied on at Permalink Reply
JohntheFish
Have you been trying to PM me? I have not received any PM on this since 5 September.
Gondwana replied on at Permalink Reply
Gondwana
@JohntheFish: that was my most recent PM. The question therein remains valid; I wasn't sure whether the PRB needed to do something before I uploaded (such as taking the current version off-line so that the new version wouldn't go straight to the marketplace).
JohntheFish replied on at Permalink Reply
JohntheFish
I am not subscribed to this thread, so don't get an email as soon as a post is made. If you need to draw something to my attention, you need to PM.

For your purposes, think of addons existing in 1 of 2 states
a) Live and in the marketplace
b) Under review in the PRB, so not available in the marketplace.

So, if you want to get the new version into the PRB, I can swap the whole addon from (a) to (b). That will take the entire addon out of the marketplace while the new version is reviewed.

As MrKD is reviewing, not returning the addon to the PRB and trusting his review would be the simpler route.

For the review - the most important test for any backup is not that a backup can be made, but that a site can be restored from it, both in place of the original (as a repair), and as a clone on a different server.
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
Hi Gondwana,

I tested the add-on and both the file and database backup worked successfully. Restoring a site using the backups was also successful.

Testing was done using a XAMPP Windows server, concrete5 8.2.1, default install with sample content, and 25 miscellaneous files.

This looks like a very useful add-on, even more so since it is free.
Gondwana replied on at Permalink Reply
Gondwana
Much obliged, MrK! :)
blinkdesign replied on at Permalink Reply
blinkdesign
Works as promised. All files and DB are backed up. (tested on 8.2.1, apache server, PHP 7.1)

Nice Job !
blinkdesign replied on at Permalink Reply
blinkdesign
Works as promised. All files and DB are backed up. (tested on 8.2.1, apache server, PHP 7.1)

Nice Job !
Gondwana replied on at Permalink Reply
Gondwana
Thanks @blinkdesign!
blinkdesign replied on at Permalink Reply
blinkdesign
one thing i noticed is, that upgrading the addon (via dashboard) won't show the database update job. therefore one cannot backup database.

however the clean install offers smack both jobs.
Gondwana replied on at Permalink Reply
Gondwana
@blinkdesign, thanks again. That's interesting. The database job was only added in version 2.0.0; I assumed the package controller would install it on upgrade. I'll investigate.
Gondwana replied on at Permalink Reply
Gondwana
D'oh! Omitted the upgrade() function, didn't I?

This is why I need other people to kick the tyres.

Should now be fixed. Thx again.
blinkdesign replied on at Permalink Reply 1 Attachment
blinkdesign
hi,
updating via dashboard from version 2.0.0 to version 2.0.1 i get an error, see attachment.
(concrete5 v.8.2.1 apache 2.4 PHP7)
i have no idea why, maybe even something our server?

best
blink.
bcron replied on at Permalink Reply
bcron
Same issue here, database dump not possible with v.2.0.1.
Any solution to this?
Thanks
bernie
Gondwana replied on at Permalink Reply 1 Attachment
Gondwana
Short answer: not yet!

I haven't been able to duplicate the problem. Is your issue that the 'Backup Database' job isn't listed in 'Automated Jobs', or are you seeing a similar error to that reported by blink?

If the job isn't listed, please try uninstalling and reinstalling the package. If that makes the job appear, it means that I still haven't got the upgrade function right.

If the problem is 'Couldn't dump database', please try upgrading to the attached version of the package. This version will write a line to your site's log (Dashboard, Reports, Logs) that will help with diagnosis. The message itself probably won't be conclusive, but it should provide info about where to look next.
bcron replied on at Permalink Reply
bcron
Hello Gondwana
Thanks for the instructions. The job shows in "Automated Jobs" but does not backup the database. We upgraded with your attached version, uninstalled - reinstalled and have still the same scenario. We are using version 8.2.1 with Firefox on OSX 10.8, with an Apache server, running PHP 7.1.

Here's the log entry:
"Simple Backup (Backup Database): failed to execute /usr/bin/mysqldump --defaults-extra-file=application/files/backup/gond-backup.cnf -r "application/files/backup/milan database.sql" milanit_mildb1 (return code: 2)"

File backup runs perfect.

PS:
Just checked via FTP: The database is in the backup folder, however the file is empty, 0 bytes
Bernie.
Gondwana replied on at Permalink Reply 1 Attachment
Gondwana
Thanks bcron. Could you please verify that milanit_mildb1 is the correct database name. I get error return code 2 when feeding in the wrong database name, although mysqldump tends to use that error code for a lot of sins.

Please try the current version. This one doesn't delete the mysqldump settings file, so you can inspect it. After attempting to run the job, you should find gond-backup.cnf in the same directory as the bad database copy. It's just a text file. Please look in it and see if anything seems untoward. You can also remove the password string and PM it to me for a closer look.

iOS could be significant, because I can't test on that.
bcron replied on at Permalink Reply 1 Attachment
bcron
Hello again,
Same with your attached v.2.0.2.
Database is the same name. Name is correct.

.cnf screenshot is attached.

Terminal is not iOS, is OSX 10.9, What is PM?
Gondwana replied on at Permalink Reply
Gondwana
Thanks for the image; it confirms a theory I have (but can't resolve right now).

PM is 'private message', which would have avoided posting your database password for all to see! It might be wise to change the database's password, unless you're very sure it's not accessible outside of your own computer/network.

I should have a revised version of the add-on available tomorrow.
Gondwana replied on at Permalink Reply
Gondwana
@bcron, could you please try version 2.0.4, available from
https://www.concrete5.org/marketplace/addons/back-up-files/...
or hopefully from your c5 site's dashboard.

The format of your database server name is unfamiliar to me; I hope the problem doesn't lie therein.
Gondwana replied on at Permalink Reply 1 Attachment
Gondwana
Bernie, could you please install and run the attached version? It won't work - but it should save some diagnostic info.

The job should now create up to three files in the base directory of your site: mysqldump-error-log.txt, mysqldump-stdout.txt and mysqldump-stderr.txt. (Two of them may be empty.) Could you please send me those files? You can delete them after doing so.

It could also be useful if you could copy and post me your application/config/database.php - although you might want to remove the password from the copy first.

I assume that there's a zero length database file in application/files/backup.

I have a nasty suspicion that the problem is an inability to connect to the database server.