wp-media / backwpup

BackWPup - WordPress Backup Plugin
https://backwpup.com
GNU General Public License v2.0
88 stars 37 forks source link

Backup before automatically update #7

Closed bueltge closed 4 years ago

bueltge commented 10 years ago

Backup automatisch erstellen, bevor das WP Autoupdate, seit 3.7 im Core, los läuft, um so den letzten Stand im Backup zu haben.

add_filter( 'schedule_event', 'my_backup_scheduler', 10, 1 );
function my_backup_scheduler( $event ) {
    // 'wp_maybe_auto_update' is the cron hook for the auto update process
    if ( 'wp_maybe_auto_update' !== $event['hook'] )
        return;

    wp_schedule_single_event( $event['timestamp'] - 5 * MINUTE_IN_SECONDS, 'my_backup' );
}

add_action( 'my_backup', 'my_backup' );
function my_backup() {
    // BackWPup Workflow
}
janmyszkier commented 4 years ago

Personally I think this is not needed feature.

bueltge commented 4 years ago

Old, not in focus and not relevant for the timeline.