Forum

Thread tagged as: Problem, Error, Backup

bucket list not working - Backup

When I try and set this up it does not let me select a bucket and the page says that it is not available (Adding a new backup plan) after you fill the info in and try and save the page.

<?php 
    return [
        'backup' => [
            'type'      => 'dropbox',
            'web_path'  => '',
            'file_path' => 'backups',
            'role'      => 'backup',
        ],
        ];
        ?>


Perch Runway: 3.0.7, PHP: 7.1.6, MySQL: 10.0.30-MariaDB, with PDO
Server OS: Linux, litespeed
Installed apps: content (3.0.7), assets (3.0.7), categories (3.0.7), perch_blog (5.5.1), perch_forms (1.9), perch_gallery (2.8.9), perch_kraken (1.1), chirp_seo (1), perch_mailchimp (3.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms', 'perch_gallery', 'perch_mailchimp', 'chirp_seo', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/robertsd/public_html/perch
PERCH_CORE: /home/robertsd/public_html/perch/core
PERCH_RESFILEPATH: /home/robertsd/public_html/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 256M, Max POST 32M, Memory: 256M, Total max file upload: 32M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
HTTP_HOST: robertsdesign.biz
DOCUMENT_ROOT: /home/robertsd/public_html
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
David Roberts

David Roberts 0 points

  • 4 years ago

Hi David

The immediate thing I can see is that your bucket filepath needs to be the full path to the backup folder - so in your case above something like "/home/robertsd/PATH-TO-BACKUP-FOLDER"

Kind regards

Jon

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's not correct Jonathan - the configuration looks ok to me.

What I don't understand is the description of the problem:

When I try and set this up it does not let me select a bucket and the page says that it is not available (Adding a new backup plan) after you fill the info in and try and save the page.

Can you be specific David?

Sorry Drew - I've only used the old folder-based backup. Forgot there was a cloud one now. I'll shut up.

Its going to dropbox

It does let me pick a bucket under target bucket (see image - https://www.evernote.com/l/AAWdPH21VbRE36Q9fqJ2cHfw8swEOGEd2EE). I Have it set up under my runway.php file as (token info removed.)

'dropbox' => [
             'access_token' => '',
            'handler'      => 'PerchDropbox_ResourceBucket',
            'handler_path'=> PERCH_CORE.'/addons/apps/perch_dropbox/PerchDropbox_ResourceBucket.class.php',

        ],      
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you confirm the name and location of your buckets file?

I can't set them up as a I get a blank page when I try and a 500 error. If i follow the info here https://docs.grabaperch.com/perch/resources/buckets/ I have a buckets.php file and use the last example backup I get https://robertsdesign.biz/perch/core/settings/backup/edit/ This page isn’t working robertsdesign.biz is currently unable to handle this request. HTTP ERROR 500

Drew McLellan

Drew McLellan 2638 points
Perch Support

What error do you get in your error log for the HTTP 500 status?

This is repeated in the error_log [26-Jun-2017 18:58:44 Europe/London] PHP Notice: Constant PERCH_SCHEDULE_SECRET already defined in /home/robertsd/public_html/perch/config/config.php on line 8

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's not causing a fatal error - it's just a notice.

There is nothing else in the log file at perch/runway/error_log

Rachel Andrew

Rachel Andrew 394 points
Perch Support

You need to check your PHP error log.

Is that in Perch? The only other error log I see gives the same info /perch/error_log

[26-Jun-2017 23:45:20 Europe/London] PHP Notice: Constant PERCH_SCHEDULE_SECRET already defined in /home/robertsd/public_html/perch/config/config.php on line 8

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, in your server error log there should be any entry at the same timestamp as the HTTP 500.

Hopefully this is it!

[26-Jun-2017 15:31:45 Europe/London] PHP Notice:  Constant PERCH_SCHEDULE_SECRET already defined in /home/robertsd/public_html/perch/config/config.php on line 8
[26-Jun-2017 15:31:45 Europe/London] PHP Warning:  include(/home/robertsd/public_html/perch/core/addons/apps/perch_dropbox/PerchDropbox_ResourceBucket.class.php): failed to open stream: No such file or directory in /home/robertsd/public_html/perch/core/lib/PerchResourceBuckets.class.php on line 89
[26-Jun-2017 15:31:45 Europe/London] PHP Warning:  include(): Failed opening '/home/robertsd/public_html/perch/core/addons/apps/perch_dropbox/PerchDropbox_ResourceBucket.class.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/robertsd/public_html/perch/core/lib/PerchResourceBuckets.class.php on line 89
[26-Jun-2017 15:31:45 Europe/London] PHP Fatal error:  Uncaught Error: Class 'PerchDropbox_ResourceBucket' not found in /home/robertsd/public_html/perch/core/lib/PerchResourceBuckets.class.php:91
Stack trace:
#0 /home/robertsd/public_html/perch/core/lib/PerchResourceBuckets.class.php(56): PerchResourceBuckets::factory(Array)
#1 /home/robertsd/public_html/perch/core/runway/settings/modes/backup.plans.edit.pre.php(18): PerchResourceBuckets::get_all_remote()
#2 /home/robertsd/public_html/perch/core/settings/backup/edit/index.php(27): include('/home/robertsd/...')
#3 {main}
  thrown in /home/robertsd/public_html/perch/core/lib/PerchResourceBuckets.class.php on line 91
Drew McLellan

Drew McLellan 2638 points
Perch Support

In your runway.php config file, check the Dropbox handler_path setting.

It should be something like:

'handler_path' => PERCH_CORE.'/runway/apps/perch_dropbox/PerchDropbox_ResourceBucket.class.php',

It is

'handler_path'=> PERCH_CORE.'/addons/apps/perch_dropbox/PerchDropbox_ResourceBucket.class.php',
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do things work once you correct it?

No, I still can't pick a bucket under target bucket

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you getting the same error?