[SolidMean] ForumBackup Dropbox Upload [Deleted]

Send me a log if you get errors. I suspect you're getting tineouts between your server and dropbox. Your web server logs should point to that. I'm not sure if there's anything to can do to fix tbat, other than to try upping the timeout limit.

However, it does upload to my Dropbox but it createsduplicates.
[\quote]

It might be creating duplicates if you are running it mutiple times on the same day, and you aren't using time as part of the file name.

But probably, the issue may be with Drobox. There is an option on your Dropbox app that let's you overwrite files with the same name.
 
after checking with my dropbox this week it seems the sql backup is transferring fine, but not the code backup. what should i do?
 
Do you have the debug option turned on for the addon? If not, please check that option, and run the code backup, and send me (in a conversation) the debug log created in in the directory where your backups are saved.

If you already have that option checked, you can either send me that log file, or just send me the portion of the log file between "START Code Backup", and "END Code Backup" for the timeframe of when your code backup ran.

Do you know if any of your code backups have worked?
 
Do you have the debug option turned on for the addon? If not, please check that option, and run the code backup, and send me (in a conversation) the debug log created in in the directory where your backups are saved.

If you already have that option checked, you can either send me that log file, or just send me the portion of the log file between "START Code Backup", and "END Code Backup" for the timeframe of when your code backup ran.

Do you know if any of your code backups have worked?

yep, had it turned on just in case. i have an 11gb file labeled "StP_Backup_2015-10-27-103032.code.tar.gz" so it looks like it worked, but didn't send over to my dropbox. i'll send you my log file now.
 
SneakyDave updated [SolidMean] ForumBackup Dropbox Upload with a new update entry:

12/28/2015: Version 1.0.20 (REQUIRES ForumBackup 1.2.00 or higher)

- Added options to choose which local backup to delete, rather than assume that both database and code local backups should be removed after transferring to DropBox. This makes the extension more flexible, especially in cases where the SFTP extension is also in use.

NOTE: This version, going forward, is only compatible with ForumBackup 1.2.00 and above.

Read the rest of this update entry...
 
Once I updated to the latest plugin, I got a notification saying my Dropbox is full because the local backups are not being deleted out of the Dropbox. Before I updated the plugin it wasn't ever getting full.
 
Can you send me a conversation, with screen shots of your DropBox options? The "Delete local backup" option only exists for the copy generated on your server. Once it is uploaded to DropBox, it can optionally be deleted from your server.

Make sure that the option to compress your backups (a new option in the latest version) is turned on. That should be the default value, but it's good to make sure it's on.
 
@SneakyDave i got this email today that i think might impact the plugin:

We're writing to you because our logs indicate that you have at least one Dropbox API app (StP Backup) that may be using an old version of the PHP Core SDK, with an out of date certificate file.

The Dropbox PHP Core SDK implements certificate pinning, based on a list of certificates included in the SDK, in order to help secure the connection to the Dropbox API servers.

On August 1st, 2016, the Dropbox API servers will be updated to use a new certificate, so if you’re using the PHP Core SDK version 1.1.1 or older, you’ll need to update version of the SDK used in your app to match. The latest version of the PHP Core SDK already contains the updated certificate file:

https://www.dropbox.com/developers-v1/core/sdks/php

You can refer to the ChangeLog file included in the SDK for a list of changes.

Please update your app to use the latest SDK by 8/1/16 to ensure continued access to the Dropbox API.

Thanks!
- The Dropbox Team

will this effect the plugin's operation? thanks!
 
SneakyDave updated [SolidMean] ForumBackup Dropbox Upload with a new update entry:

DropBox SDK upgrade to 1.1.6

Updated the DropBox SDK to version 1.1.6. No enhancements or bug changes are included in this version. This should bring the SDK certificates into compliance before they go out of compliance on 8/1/2016.

As reported here:
https://xenforo.com/community/threa...ropbox-upload-paid.102856/page-3#post-1058077

More info: http://sneakydave.com/community/products/solidmean-forumbackup-dropbox-upload.8/changelog

This is basically a security caution as...

Read the rest of this update entry...
 
Using version 1.0.20.

I get a 500 error when the backup runs. I tried to take a database backup again with a cron job and got this:


Code:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@myforum.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 mod_fcgid/2.3.6 Server at www.myforum.org Port 80


The forum logs say this:

Code:
2016-05-16 05:41:02 | INFO | Verified that database backup exists...
2016-05-16 05:41:02 | INFO | Verified that database backup has data...
2016-05-16 05:41:02 | INFO | DROPBOX - Dropbox Account Info: array (
....
)
2016-05-16 05:41:02 | INFO | DROPBOX - Opening backup file to upload...
2016-05-16 05:41:02 | INFO | DROPBOX - Attempting the upload...

The Apache logs at this time say this:
Code:
[Mon May 16 05:41:24 2016] [warn]  mod_fcgid: read data timeout in 40 seconds, referer: http://www.myforum.org/forums/admin.php?cron/
[Mon May 16 05:41:24 2016] [error]Premature end of script headers: admin.php, referer: http://www.myforum.org/forums/admin.php?cron/

Surprisingly even after disabling the dropbox extension from the addon section in the ACP, I still get the same error in the forum backup log, along with the same 500 internal server error.
 
Last edited:
Sounds like that the DropBox addon is not the problem happens with it disabled, and if you did it via a cron job.

I tried to take a database backup again with a cron job and got this

Is this your own cron job that you created, or do you mean you started it via the XenForo Tools -> Cron Entries menu?

From your Apache error logs, it appears there is 40 second timeout that is being reached which might be causing the error.

Are you on shared hosting?
How large is your database?
Have you tried removing unncecessary tables from the backup (via the ForumBackup Database Options)?
 
Is this your own cron job that you created, or do you mean you started it via the XenForo Tools -> Cron Entries menu?

The latter. I ran it via the Cron Entries in XenForo.



From your Apache error logs, it appears there is 40 second timeout that is being reached which might be causing the error.

Are you on shared hosting?
How large is your database?
Have you tried removing unncecessary tables from the backup (via the ForumBackup Database Options)?


I'm on a VPS. Database is around 400 MB (.sql) when exported directly from phpmyadmin.(Forum has 3500 members)

No, I haven't tried removing unnecessary tables yet.

The zip files do appear stored on my server though. It's just that there's always a 500 server error after the backup runs and the forum doesn't quit the maintenance mode. Load averages were within limits when the backup was taking place.

PHP max execution time was at 30 seconds. I made it 60, restarted the server and ran the cron entry again. Result was same -- HTTP 500 error.
 
Last edited:
@SneakyDave

I tried running the cron entry again and it worked fine this time! The database backup even went to Dropbox! :)

Unfortunately the code backup didn't go to Dropbox. Here's the forum backup log for it:


Code:
2016-05-24 03:50:23 | INFO | START Code Backup
2016-05-24 03:50:23 | INFO | Turning forum off...
2016-05-24 03:50:23 | INFO | Creating the tar file: tar --ignore-failed-read -f /home/username/public_html/forumbackups/forumbackup_2016-05-24-035023.code.tar -cP /home/username/public_html/forums 2>> /home/username/public_html/forumbackups/forumbackup.log
2016-05-24 03:50:24 | INFO | Compressing the file: gzip /home/username/public_html/forumbackups/forumbackup_2016-05-24-035023.code.tar 2>> /home/username/public_html/forumbackups/forumbackup.log
2016-05-24 03:50:48 | INFO | Code backup complete...
2016-05-24 03:50:48 | INFO | Turning forum on...
2016-05-24 03:50:48 | INFO | Deleting old code backups, keeping 6
2016-05-24 03:50:48 | INFO | Found backup file: forumbackup_2016-05-24-035023.code.tar.gz, modified 2016-05-24 03:50:24
2016-05-24 03:50:48 | INFO | Sorted 1 filenames by filemtime
2016-05-24 03:50:48 | INFO | No code backups to delete...
2016-05-24 03:50:48 | INFO | Verified that code backup exists...
2016-05-24 03:50:48 | INFO | Verified that code backup has data...
2016-05-24 03:50:48 | INFO | DROPBOX - Dropbox Account Info: array (
....
)
2016-05-24 03:50:48 | INFO | DROPBOX - Opening backup file to upload...
2016-05-24 03:50:48 | INFO | DROPBOX - Attempting the upload...

Apache error_log: mod_fcgid again

Code:
[Tue May 24 03:51:03 2016] [warn]  mod_fcgid: read data timeout in 40 seconds, referer: http://www.website.org/forums/admin.php?cron/
[Tue May 24 03:51:03 2016] [error] Premature end of script headers: admin.php, referer: http://www.website.org/forums/admin.php?cron/


The size of the zipped file is around 300 MB for the code backup. Is that a very large file to upload?
 
No. It isn't very large. But the problem seems to be your mod_fcgid limit. It's a time limit that probably needs to be increased, see my previous post on that.

Beyond that, I can't help much more.
 
No. It isn't very large. But the problem seems to be your mod_fcgid limit. It's a time limit that probably needs to be increased, see my previous post on that.

Beyond that, I can't help much more.


Thanks! :)


I spoke to my host and they recommended to switch the PHP handler to suPHP. (Even though I think it causes higher CPU usage?). After switching to suPHP the backups are taking place as expected, and going to Dropbox without errors :)
 
@SneakyDave I am interested in your great work here Dave.

May I ask, will this keep only 3 copy of backups that exist in my Dropbox account? Or will it just create as many as the cron set, and regardless how much diskspace we have remained in Dropbox?

Thank you
 
Top Bottom