Cómo añadir servicios de S3 mediante programación

Starting from BackWPup version 3.6.10 is possible to add new S3 services to the default list through the filter hook backwpup_s3_destination. Every service we need to add can be set via an array that specifies the label, the region and the url of the service we want to add. Here below we set an example:…

Inicio Documentación Cómo añadir servicios de S3 mediante programación

Starting from BackWPup version 3.6.10 is possible to add new S3 services to the default list through the filter hook backwpup_s3_destination.

Cada servicio que necesitemos añadir se puede configurar mediante una matriz que especifique la etiqueta, la región y la URL del servicio que queremos añadir.
A continuación mostramos un ejemplo:

add_filter( 'backwpup_s3_destination', function ( $destinations ) {
        return array_merge( array(array(
                        'label'    => __( 'FirstServiceTest: AMS3', 'backwpup' ),
                        'region'   => 'ams3',
                        'base_url' => 'https://example.com',
                ),
                array(
                        'label'    => __( 'SecondServiceTest: AMS', 'backwpup' ),
                        'region'   => 'nl-ams',
                        'base_url' => 'https://example.com',
                )
        ), $destinations );
} );

En este ejemplo, configuramos dos matrices: una para FirstServiceTest y otra para SecondServiceTest.
Estos nuevos servicios estarán ahora disponibles en la lista de servicios S3 para los trabajos correspondientes.

Mantén tu WordPress seguro

Ofrece a los datos de tu sitio web la protección que se merecen con BackWPup Pro.