UpdraftPlus Home › Forums › Paid support forum – UpdraftPlus backup plugin › Problem whit uploads dir
- This topic has 13 replies, 2 voices, and was last updated 11 years, 3 months ago by udadmin.
-
AuthorPosts
-
August 31, 2013 at 10:39 am #17953canalesglobalculturaParticipant
Hi
I am having several problem with the uploads dir in my multisite instalation. I’m using a dropbox account where “themes.zip”, “plugins.zip”, “others.zip” and “db.gz” are uploading without problems but not the same with “uploads.zip”.
“Uploads.zip” is not being uploaded so the file on the “updraft” dir is not being deleted and therefore my disk quota is decreasing. Furthermore the backup process try to repeat the attempt so it duplicates the problem. I had to manually delete Active jobs
I will send you a mail with some screen captures and also the log file. Please let me know the solution as soon as possible
August 31, 2013 at 1:43 pm #18250udadminKeymasterHi,
The log indicates that the backup did not finish on its first run, and would be resumed later.
1) Has it made any progress in the mean-time?
2) If not, then is it a site that has any visitors during the night? (If not, then UD never gets to run – because it relies on WordPress handing over to it).David
September 1, 2013 at 9:27 pm #18257canalesglobalculturaParticipantHi,
1) No, it hasn’t
2) Probably yes but is my problem related to the wp scheduler? It is disabled because wp-cron is executed as a cron job (but it seems not working)Also, I didn’t know that a running backup from the shell can be done. I just read it now at FAQs ;)
I try it and let you know
Thanks,
September 2, 2013 at 5:59 am #18258udadminKeymasterHi,
The scheduler is disabled? That’ll likely be it – probably your cron job does not run frequently enough. Try running it every 10 minutes in the period that the backup is active…
… however, running from the shell is *much* better, if your host allows that.
David
September 2, 2013 at 8:07 pm #18261canalesglobalculturaParticipantHi David
I don’t have shell access, so I’m trying to run it as cron job; but I can’t. I have saved a php file at wp root directory that contains just this:
<?php
define(‘UPDRAFTPLUS_CONSOLELOG’, true);
require_once(‘wp-load.php’);
do_action(‘updraft_backup_all’);?>
But the cron job is being called from another directory (where the crontab is; I can not change that), therefore the “wp-load.php” file is not found. The error is:
Fatal error: require_once(): Failed opening required ‘./wp-load.php’ (include_path=’.:/usr/local/lib/php’) in /home/……/public_html/Updraft_Backup.php on line 4
What can I do?
September 2, 2013 at 11:40 pm #18263udadminKeymasterHi,
In your cron job, begin with a “cd” command to move to the directory with wp-load.php and the above file in it (i.e. cd “/home/…/public_html”
Best wishes,
DavidSeptember 4, 2013 at 12:33 am #18269canalesglobalculturaParticipantHi, David
After I spent a lot of time trying to make it work, I found that in a WordPress MU installation is not as simple as add a “cd” command to move to the directory because is not posible to load ‘wp-load.php’ and also not ‘wp-config.php’ from command-line. The only way I can run it is saving a cron job as “curl https://….thephpfile.php” but I’m not sure it will produce same problem uploading big files to dropbox
How do you have tested the plugin in a WP Multisite running from command-line? Do you try to run it as “/usr/bin/php …./thephpfile.php”?
Thanks,
September 4, 2013 at 12:15 pm #18274udadminKeymasterHi,
Do you find that the call to wp-load.php doesn’t return? I just tried it on one of my multisite installs, and it appears not to return, unlike on non-multisite. I had not been aware of that. I am looking for solutions and will get back to you.
David
September 4, 2013 at 4:39 pm #18277canalesglobalculturaParticipantHi, David
I added this lines to my php file:
if ( !defined(‘ABSPATH’) ) {
chdir(‘/home/…/public_html/’);
$ruta = ‘/home/…/public_html/’;
set_include_path(get_include_path() . PATH_SEPARATOR . $ruta);
define( ‘ABSPATH’, getcwd() . ‘/’ );
if ( file_exists( ABSPATH . ‘wp-load.php’) and (is_readable( ABSPATH . ‘wp-load.php’) ) ) {
$dirlog=”wp-load.php exists and is readable at “.ABSPATH;
error_log($dirlog, 1, “mymail”);
require_once( ABSPATH . ‘wp-load.php’ );
error_log(“file loaded”, 1, “mymail”);
} else {
$dirlog=”wp-load.php DONT exists or is NOT readable at “.ABSPATH;
error_log($dirlog, 1, “mymail”);
}I received one mail with the text: wp-load.php exists and is readable at ‘/home/…/public_html/’; no more mails received.
I made a change, loading directly wp-config.php. Same result; just one mail
I made another change, loading a simply php test file (just an echo). The result? I receive one mail with the text: wp-load.php exists and is readable at ‘/home/…/public_html/’; and immediately another mail with the text “file loaded”
So, I googled.. and I find some things like this: https://core.trac.wordpress.org/ticket/14913
My site is a hosting domain, so I can’t do so many tests, so please when you have resolved the problem, lets me know as soon as possible
Thanks,
September 4, 2013 at 10:05 pm #18278udadminKeymasterHi,
Yes – that WordPress core bug (14193) is the relevant one that is stopping the cron job from working on WP Multisite. Good find!
Note that there’s a patch available in that bug report – if you patch your WordPress core, then it may then work… I’d be interested to hear if it does.
Looking at what the patch does, another option would be for you to set $_SERVER[‘HTTP_HOST’] in your PHP file to match the main site on your multisite.
David
September 5, 2013 at 10:17 pm #18286canalesglobalculturaParticipantHi, David
Set $_SERVER[‘HTTP_HOST’] in my PHP file don’t work and the “curl https://….thephpfile.php” is producing same problems with the upload of big files to dropbox.
Please send me the ms-settings.php with the patch applied as soon as posible. I need to do my backup completely and send it to dropbox urgently
Thanks
September 6, 2013 at 5:51 am #18287udadminKeymasterHi,
Here’s a patched version of ms-settings.php – you’ll need to remove the .txt extension after downloading, of course: https://david.dw-perspective.org.uk/tmp/ms-settings.php.txt
For future usefulness, to apply the patch to ms-settings.php in my install, I just did this:
# cd /path/to/wordpress/install/directory
# wget https://core.trac.wordpress.org/raw-attachment/ticket/14913/14913.diff
# patch -p1 </tmp/14913.diffI tested, and it worked for me – after applying the patch, I could backup from the shell.
David
September 6, 2013 at 6:34 pm #18288canalesglobalculturaParticipantHi, David
It works!
I will keep an eye on it during the next days but, at the moment, my first test have been worked fine from the shell.
Thanks for all your support
September 6, 2013 at 6:36 pm #18289udadminKeymaster:-)
-
AuthorPosts
- The topic ‘Problem whit uploads dir’ is closed to new replies.