Support » Plugin: UpdraftPlus WordPress Backup Plugin » Restoration Issue

  • Resolved chexwarrior

    (@chexwarrior)


    Hi guys,

    Been running into an issue when attempting to perform a restore for uploads with this plugin. Every time I run a restore I get an error that seems to indicate a permissions issue, however this is not the case. The plugin runs as the www-data user (UID 82) and the uploads directory is accessible (read/write) by that user as well. I think the issue may lie in the fact that the uploads directory is actually a symlink to a directory outside of the site root. Does using a symlink for uploads cause an issue with this plugin?

    I got the idea that the symlink may be an issue from a developer’s comment near the end of this thread.

    Restoration Log:

    
    0000.003 () Opened log file at time: Thu, 24 Jan 2019 20:05:25 +0000 on https://stage.siteName.com
    0000.004 () UpdraftPlus WordPress backup plugin (https://updraftplus.com): 1.16.4 WP: 5.0.2 PHP: 7.2.14 (fpm-fcgi, Linux php-3004195925-q0rrm 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64) MySQL: 10.2.21-MariaDB WPLANG: en_US Server: nginx/1.15.8 safe_mode: 0 max_execution_time: 900 memory_limit: 512M (used: 5.9M | 4M) multisite: N openssl: LibreSSL 2.7.4 mcrypt: Y LANG:  ZipArchive::addFile: Y
    0000.004 () Free space on disk containing Updraft's temporary directory: 233786.2 MB
    0000.046 () Restore job started. Entities to restore: uploads, db. Restore options: {"updraft_encryptionphrase":"","updraft_restorer_wpcore_includewpconfig":false,"updraft_incremental_restore_point":-1}
    0000.049 () Entity: db
    0000.049 () restore_backup(backup_file=backup_2019-01-24-2003_siteName_0afa36509f15-db.gz, type=db, info=a:0:{}, last_one=)
    0000.049 () Unpacking backup... (backup_2019-01-24-2003_siteName_0afa36509f15-db.gz, 0.5 Mb)
    0000.051 () Database successfully unpacked
    0000.051 () Restoring the database (on a large site this can take a long time - if it times out (which can happen if your web hosting company has configured your hosting to limit resources) then you should use a different method, such as phpMyAdmin)...
    0000.051 () Using direct MySQL access; value of use_mysqli is: 1
    0000.061 () Max packet size: 256 MB
    0000.061 () Entering maintenance mode
    0000.061 () Enabling Maintenance mode…
    0000.062 () Backup of: https://stage.siteName.com
    0000.063 () Content URL: https://stage.siteName.com/wp-content
    0000.063 () Uploads URL: https://stage.siteName.com/wp-content/uploads
    0000.063 () Old table prefix: nyt_
    0000.063 () Site information: multisite=0
    0000.065 () New table prefix: nyt_
    0000.069 () Processing table (InnoDB): nyt_options
    0000.128 () Restoring prior UD configuration (table: nyt_options; keys: 3)
    0000.138 () Processing table (InnoDB): nyt_users
    0000.146 () Processing table (InnoDB): nyt_usermeta
    0000.157 () Processing table (InnoDB): nyt_commentmeta
    0000.164 () Processing table (InnoDB): nyt_comments
    0000.174 () Processing table (InnoDB): nyt_links
    0000.181 () Processing table (InnoDB): nyt_postmeta
    0000.264 () Processing table (InnoDB): nyt_posts
    0000.375 () Processing table (InnoDB): nyt_term_relationships
    0000.385 () Processing table (InnoDB): nyt_term_taxonomy
    0000.392 () Processing table (InnoDB): nyt_termmeta
    0000.401 () Processing table (InnoDB): nyt_terms
    0000.412 () Processing table (InnoDB): nyt_blc_filters
    0000.420 () Processing table (InnoDB): nyt_blc_instances
    0000.434 () Processing table (InnoDB): nyt_blc_links
    0000.460 () Database queries processed: 50 in 0.41 seconds
    0000.465 () Processing table (InnoDB): nyt_blc_synch
    0000.474 () Processing table (InnoDB): nyt_postmark_log
    0000.487 () Processing table (InnoDB): nyt_redirection_404
    0000.519 () Processing table (InnoDB): nyt_redirection_groups
    0000.532 () Processing table (InnoDB): nyt_redirection_items
    0000.543 () Processing table (InnoDB): nyt_redirection_logs
    0000.552 () Processing table (InnoDB): nyt_wfBadLeechers
    0000.561 () Processing table (InnoDB): nyt_wfBlockedIPLog
    0000.569 () Processing table (InnoDB): nyt_wfBlocks
    0000.577 () Processing table (InnoDB): nyt_wfBlocksAdv
    0000.584 () Processing table (InnoDB): nyt_wfConfig
    0000.593 () Processing table (InnoDB): nyt_wfCrawlers
    0000.600 () Processing table (InnoDB): nyt_wfFileMods
    0000.608 () Processing table (InnoDB): nyt_wfHits
    0000.621 () Processing table (InnoDB): nyt_wfHoover
    0000.628 () Processing table (InnoDB): nyt_wfIssues
    0000.636 () Processing table (InnoDB): nyt_wfLeechers
    0000.642 () Processing table (InnoDB): nyt_wfLockedOut
    0000.649 () Processing table (InnoDB): nyt_wfLocs
    0000.655 () Processing table (InnoDB): nyt_wfLogins
    0000.661 () Processing table (InnoDB): nyt_wfNet404s
    0000.668 () Processing table (InnoDB): nyt_wfReverseCache
    0000.674 () Database queries processed: 100 in 0.62 seconds
    0000.674 () Processing table (InnoDB): nyt_wfScanners
    0000.681 () Processing table (InnoDB): nyt_wfStatus
    0000.688 () Processing table (InnoDB): nyt_wfThrottleLog
    0000.696 () Processing table (InnoDB): nyt_wfVulnScanners
    0000.701 () UpdraftPlus Vault: this site has not been connected - check your settings
    0000.866 () Unlocking database and leaving maintenance mode
    0000.866 () Finished: lines processed: 110 in 0.81 seconds
    0000.866 () Cleaning up rubbish...
    0000.872 () Entity: uploads
    0000.872 () restore_backup(backup_file=backup_2019-01-24-2003_siteName_0afa36509f15-uploads.zip, type=uploads, info=a:2:{s:4:"path";s:36:"/var/www/html/web/wp-content/uploads";s:11:"description";s:7:"Uploads";}, last_one=1)
    0000.872 () Unpacking backup... (backup_2019-01-24-2003_siteName_0afa36509f15-uploads.zip, 167 Mb)
    0000.873 () Unzipping backup_2019-01-24-2003_siteName_0afa36509f15-uploads.zip to /var/www/html/web/wp-content/upgrade/a9f89192/ using UpdraftPlus_ZipArchive
    0001.193 () Unzip progress: 1002 out of 5171 files (56.1 MB, uploads/2012/06/._brook-termRET-1-600x214.jpg)
    0001.339 () Unzip progress: 2003 out of 5171 files (77.6 MB, uploads/2012/06/WX3P2667crp-1-150x150.jpg)
    0001.476 () Unzip progress: 3004 out of 5171 files (98.7 MB, uploads/2012/06/Logo-siteName-drop-out-small-v411-150x130.png)
    0001.627 () Unzip progress: 4005 out of 5171 files (125.4 MB, uploads/2012/08/._siteName-econ-impact-study-600x270.jpeg)
    0001.908 () Unzip progress: 5006 out of 5171 files (167.2 MB, uploads/2015/03/2014-siteName-EconStudy-1.pptx)
    0001.947 () Unzip progress: 5171 out of 5171 files (171 MB, uploads/2015/._10)
    0001.995 () Moving old data: filesystem method / updraft_dir is potentially possible
    0001.995 () Moving old data: can potentially use wp_filesystem method / -old
    0001.995 () Moving old data out of the way...
    0002.258 () Error message: Could not move the files into place. Check your file permissions.
    0002.258 () Error data (move_failed): /var/www/html/web/wp-content/uploads/2017 -> /var/www/html/web/wp-content/updraft/uploads-old/2017
    0002.258 () uploads: /var/www/html/web/wp-content/uploads: deleting contents (as attempts to copy failed)
    0002.706 () Moving unpacked backup into place...
    0002.974 () PHP event: code E_WARNING: copy(): The first argument to copy() function cannot be a directory (line 243, wp-admin/includes/class-wp-filesystem-direct.php)
    0002.977 () Error message: Could not move the files into place. Check your file permissions.
    0002.977 () Error data (move_failed): /var/www/html/web/wp-content/upgrade/a9f89192/uploads/2017 -> /var/www/html/web/wp-content/uploads/2017
    0002.978 () Restore failed...
    0002.978 () Error message: Could not move the files into place. Check your file permissions.
    0002.978 () Error data (move_failed): /var/www/html/web/wp-content/upgrade/a9f89192/uploads/2017 -> /var/www/html/web/wp-content/uploads/2017
    0002.978 () Restore failed
    

    Thank you in advance
    `

    • This topic was modified 2 years, 2 months ago by chexwarrior.
    • This topic was modified 2 years, 2 months ago by chexwarrior.
Viewing 1 replies (of 1 total)
  • Plugin Author David Anderson

    (@davidanderson)

    Looking at the form of the error message, I don’t think a symlink on /var/www/html/web/wp-content/uploads should be a problem; moving /var/www/html/web/wp-content/uploads/2017 wouldn’t involve the symlink.

    Unfortunately when a PHP instruction to do a filesystem operation is issued, if it fails, all that the caller (i.e. UpdraftPlus) gets back is “failed”; no information on why. (It’s not UD pre-emptively guessing that something won’t work; UD tries, but gets back the “failed” code). The advice to look at permissions is only the most likely guess, most of the time. There can be other things in a setup. e.g. SELinux, or AppArmor; or lack of disk space. There may be other possibilities. Or perhaps there is some subtlety with the symlink that I haven’t imagined; you could try removing it and seeing if that makes a difference. We have tested setups with symlinks in the past and aren’t aware of a general problem.

    David

Viewing 1 replies (of 1 total)
  • The topic ‘Restoration Issue’ is closed to new replies.