• Resolved emiliol

    (@emiliol)


    Hi,

    I use CYAN Backup in several wordpress instances, and it’s a solid rock, it works like a charm.

    Unfortunately, It doesn’t work properly in a large site. We can make ad-hoc backups without any problem, resulting 850 MB files, but the scheduled backups on the same site never complete, they don’t appear in the backup list.

    I can’t see error logs (shared hosting, don’t allowed ?? ). Could you please help me?

    Thank you in advance.

    https://www.ads-software.com/plugins/cyan-backup/

Viewing 10 replies - 16 through 25 (of 25 total)
  • Thread Starter emiliol

    (@emiliol)

    Remote storage is not enabled. I tryed but never get it working ??

    I see the last sentence in scheduled backup function is:

    $this->prune_backups( $options['prune']['number'] );

    Can I move it to the top of the function, before the backup executes?

    Plugin Author Greg Ross

    (@gregross)

    You can but it probably won’t do anything as the backup hasn’t been created yet and therefore there is nothing to prune.

    Have you enabled e-mailing the log file?

    Do yo receive it?

    Plugin Author Greg Ross

    (@gregross)

    Try replacing the above function with the following:

    public function scheduled_backup() {
    		$remote_backuper = $this->remote_backuper();
    
    		$this->write_debug_log( "Starting backup" );
    		// Run the backup.
    		$result = $remote_backuper->wp_backup();
    		$this->write_debug_log( "Completed backup" );
    
    		// Get the options.
    		$options = (array)get_option($this->option_name);
    
    		$this->write_debug_log( "Starting next schedule" );
    		// Determine the next backup time.
    		$this->schedule_next_backup();
    		$this->write_debug_log( "SCompleted next schedule" );
    
    		$this->write_debug_log( "Starting transfer" );
    		// Send the backup to remote storage.
    		$this->transfer_backups( $result['backup'], $options['remote'], 'schedule' );
    		$this->write_debug_log( "Completed transfer" );
    
    		$this->write_debug_log( "Starting pruning" );
    		// Prune existing backup files as per the options.
    		$this->prune_backups( $options['prune']['number'] );
    		$this->write_debug_log( "Completed pruning" );
    	}

    Run the scheduled backup and check your archive directory, there should be a debug.txt file in it, post the results.

    Thread Starter emiliol

    (@emiliol)

    Yes, log e-mailing is enabled, and I receive it.

    I have edited the file, I will post here the log results asap.

    Thank you,

    Thread Starter emiliol

    (@emiliol)

    Hi Greg,

    There’s no debug.txt in archive directory. In fact, there’s no debug.txt in any subdirectory.

    Do I have to change the log location?:

    class CYANBackup {
            public  $plugin_name = 'CYAN Backup';
            public  $textdomain  = 'cyan-backup';
    
            private $plugin_basename, $plugin_dir, $plugin_file, $plugin_url;
            private $menu_base;
            private $option_name;
            private $admin_action;
    <strong>        private $debug_log = null;</strong>
            private $backup_page;
            private $option_page;
            private $about_page;
    Plugin Author Greg Ross

    (@gregross)

    No, it get auto created when the first write_debug_log() is called.

    It’s probably not getting written properly when the script terminates per-maturly and doesn’t close the file.

    Try this:

    public function scheduled_backup() {
    		$remote_backuper = $this->remote_backuper();
    
    		$this->write_debug_log( "Starting backup" );
    		$this->close_debug_log();
    		// Run the backup.
    		$result = $remote_backuper->wp_backup();
    		$this->write_debug_log( "Completed backup" );
    		$this->close_debug_log();
    
    		// Get the options.
    		$options = (array)get_option($this->option_name);
    
    		$this->write_debug_log( "Starting next schedule" );
    		$this->close_debug_log();
    		// Determine the next backup time.
    		$this->schedule_next_backup();
    		$this->write_debug_log( "SCompleted next schedule" );
    		$this->close_debug_log();
    
    		$this->write_debug_log( "Starting transfer" );
    		$this->close_debug_log();
    		// Send the backup to remote storage.
    		$this->transfer_backups( $result['backup'], $options['remote'], 'schedule' );
    		$this->write_debug_log( "Completed transfer" );
    		$this->close_debug_log();
    
    		$this->write_debug_log( "Starting pruning" );
    		$this->close_debug_log();
    		// Prune existing backup files as per the options.
    		$this->prune_backups( $options['prune']['number'] );
    		$this->write_debug_log( "Completed pruning" );
    		$this->close_debug_log();
    	}
    Thread Starter emiliol

    (@emiliol)

    I have edited the file, I will post here the log results asap.

    Thank you,

    Thread Starter emiliol

    (@emiliol)

    debug.txt:

    [2014-08-27 17:00:14] Starting backup
    [2014-08-27 17:02:30] Completed backup
    [2014-08-27 17:02:30] Starting next schedule
    Plugin Author Greg Ross

    (@gregross)

    Try commenting out the following line:

    $this->schedule_next_backup();
    Thread Starter emiliol

    (@emiliol)

    Done. I’ll post debug log asap. Thank you.

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘SCHEDULED LARGE BACKUP STOPS’ is closed to new replies.