### Purge Backup Range - curl Example Source: https://documenter.getpostman.com/view/13664964/TVssjU7Z/index This curl command demonstrates how to purge a range of backups from a site's remote storage. It requires the site ID, authorization token, and a JSON payload specifying the backup source and the 'from' and 'to' backup identifiers. The 'from_backup' and 'to_backup' parameters accept strings composed of a date, time, and an optional tag. ```curl curl --location -g --request PUT 'https://my.gridpane.com/oauth/api/v1/backups/purge-range/{site.id}' \ --header 'Authorization: Bearer {{oath_token}}' \ --header 'Content-Type: application/json' \ --data '{ "backup_source": "wasabi", "from_backup": "2020-11-24 08:59 mytag", "to_backup": "2021-11-24 09:50" }' ``` -------------------------------- ### Update Site Backups Prune Schedule - curl Example Source: https://documenter.getpostman.com/view/13664964/TVssjU7Z/index This curl command illustrates how to update the prune schedule for a site's backups. It targets the prune-schedule endpoint with the site ID and includes an Authorization header and JSON payload. The payload specifies the backup type ('local' or 'remote'), the number of days to retain backups, and the prune schedule preference. ```curl curl --location -g --request PUT 'https://my.gridpane.com/oauth/api/v1/backups/prune-schedule/{site.id}' \ --header 'Authorization: Bearer {{oath_token}}' \ --header 'Content-Type: application/json' \ --data '{ "backup_type": "local", "retain_days": 30, "prune_schedule": 0 } ' ``` -------------------------------- ### Remove Remote Backup Integration - curl Example Source: https://documenter.getpostman.com/view/13664964/TVssjU7Z/index This curl command shows how to remove a remote backup integration from a site. It sends a DELETE request to the integrations endpoint, including the site ID in the URL and the integration ID in the JSON payload. The integration ID can be obtained by first fetching the site's backup integrations. ```curl curl --location --request DELETE 'https://my.gridpane.com/oauth/api/v1/backups/integrations/42' \ --header 'Authorization: Bearer {{oath_token}}' \ --data '{ "integrations_id": 23 } ' ``` -------------------------------- ### Purge Site Backup (cURL) Source: https://documenter.getpostman.com/view/13664964/TVssjU7Z/index This cURL command illustrates how to purge a specific site backup. It requires the site ID, backup source, backup type, and the exact backup string (date, time, and optional tag). The Authorization header must include a valid OAuth token. ```cURL curl --location --request PUT 'https://my.gridpane.com/oauth/api/v1/backups/purge/42' \ --header 'Authorization: Bearer {{oath_token}}' \ --header 'Content-Type: application/json' \ --data '{ "backup_source": "wasabi", "backup_type": "manual", "backup": "2021-12-25 08:59 mytag" }' ``` -------------------------------- ### Update Site Backup Schedule (cURL) Source: https://documenter.getpostman.com/view/13664964/TVssjU7Z/index This cURL command demonstrates how to update the backup schedule for a specific site. It requires the site ID, backup schedule type, minute, hour, and day as parameters. The authorization header must be set to use a valid OAuth token. ```cURL curl --location --request PUT 'https://my.gridpane.com/oauth/api/v1/backups/schedule/site/1038' \ --header 'Authorization: Bearer {{oath_token}}' \ --header 'Content-Type: application/json' \ --data '{ "id": 23, "bup_schedule": "hourly", "minute": 30 } ' ``` -------------------------------- ### PUT /oauth/api/v1/backups/schedule/site/{site.id} Source: https://documenter.getpostman.com/view/13664964/TVssjU7Z/index Updates a site's backup schedule. You can set the schedule type, minute, hour, and day for backups. ```APIDOC ## PUT /oauth/api/v1/backups/schedule/site/{site.id} ### Description Update a site's backup schedule. ### Method PUT ### Endpoint `/oauth/api/v1/backups/schedule/site/{site.id}` ### Parameters #### Path Parameters - **site.id** (integer) - Required - The ID of the site whose backup schedule you want to update. #### Request Body - **id** (integer) - Required - Integer of the site's backup schedule that you want to update. Use a GET site backup schedule to get the schedule id. - **bup_schedule** (string) - Required - The type of backup schedule to set, accepts: `hourly`, `daily`, `weekly`, `monthly`. - **minute** (integer) - Required - The minute of the hour to run the schedule. - **hour** (integer) - Required IF `bup_schedule` is `daily`, `weekly`, or `hourly`. The hour of the day to run the schedule. Accepts `0` to `23`. - **day** (integer) - Required IF `bup_schedule` is `weekly` or `monthly`. The day of the month or week to run the schedule. If `bup_schedule` is weekly then accepts `0` to `6` with `0` being Sunday. If `bup_schedule` is monthly then accepts `1` to `28`. ### Request Example ```json { "id": 23, "bup_schedule": "hourly", "minute": 30 } ``` ### Response #### Success Response (200) No response body ``` -------------------------------- ### PUT /oauth/api/v1/backups/purge/{site.id} Source: https://documenter.getpostman.com/view/13664964/TVssjU7Z/index Purges a specific site backup. You need to provide the backup source, type, and the backup identifier. ```APIDOC ## PUT /oauth/api/v1/backups/purge/{site.id} ### Description Purge a backup. ### Method PUT ### Endpoint `/oauth/api/v1/backups/purge/{site.id}` ### Parameters #### Path Parameters - **site.id** (integer) - Required - The ID of the site whose backup you want to purge. #### Request Body - **backup_source** (string) - Required - The source of the backup to be purged, accepts: `local`, `aws-s3`, `backblaze`, `dropbox`, `wasabi`. - **backup_type** (string) - Required - The type of backup to be purged, accepts: `manual`, `automatic`. - **backup** (string) - Required - The backup that you want to purge. This will be a string composed of a date, a time, and optionally a tag. e.g. `2021-11-24 08:59` or `2021-11-24 08:59 mytag`. ### Request Example ```json { "backup_source": "wasabi", "backup_type": "manual", "backup": "2021-12-25 08:59 mytag" } ``` ### Response #### Success Response (200) No response body ``` -------------------------------- ### PUT /oauth/api/v1/backups/prune-schedule/{site.id} Source: https://documenter.getpostman.com/view/13664964/TVssjU7Z/index Updates the prune schedule for a site's backups. You can configure the backup type, retention days, and the pruning schedule. ```APIDOC ## PUT /oauth/api/v1/backups/prune-schedule/{site.id} ### Description Updates the prune schedule for a site's backups. You can configure the backup type, retention days, and the pruning schedule. ### Method PUT ### Endpoint `/oauth/api/v1/backups/prune-schedule/{site.id}` ### Parameters #### Path Parameters - **site.id** (string) - Required - The ID of the site for which to update the prune schedule. #### Query Parameters None #### Request Body - **backup_type** (string) - Required - The type of backup for which to adjust the prune schedule. Accepts: `local`, `remote`. - **retain_days** (integer) - Required - The maximum number of days that the backups should be kept for before pruning them out. Accepts: `0` (unlimited), `30`, `90`, `180`, `360`. - **prune_schedule** (integer) - Required - The schedule that backups should be pruned by. Accepts: `0` (keep daily backups), `1` (keep daily backups for a week, then weekly backups), `2` (keep daily backups for a month, then monthly backups), `3` (keep daily backups for a week, then weekly backups for a month, then monthly backups). ### Request Example ```json { "backup_type": "local", "retain_days": 30, "prune_schedule": 0 } ``` ### Response #### Success Response (200) No response body #### Response Example No response body ``` -------------------------------- ### DELETE /oauth/api/v1/backups/integrations/{site.id} Source: https://documenter.getpostman.com/view/13664964/TVssjU7Z/index Detaches a remote backup integration from a site. Use this endpoint to remove a connection to a remote backup service. ```APIDOC ## DELETE /oauth/api/v1/backups/integrations/{site.id} ### Description Detaches a remote backup integration from a site. Use this endpoint to remove a connection to a remote backup service. ### Method DELETE ### Endpoint `/oauth/api/v1/backups/integrations/{site.id}` ### Parameters #### Path Parameters - **site.id** (string) - Required - The ID of the site from which to remove the backup integration. #### Query Parameters None #### Request Body - **integrations_id** (integer) - Required - ID of the remote backup integration you wish to remove. Use a GET site backup integrations to get this ID and confirm removal. ### Request Example ```json { "integrations_id": 23 } ``` ### Response #### Success Response (200) No response body #### Response Example No response body ``` -------------------------------- ### PUT /oauth/api/v1/backups/purge-range/{site.id} Source: https://documenter.getpostman.com/view/13664964/TVssjU7Z/index Purges a range of backups for a specific site. This endpoint allows you to specify the source of the backups and the range (from and to) of backups to be purged. ```APIDOC ## PUT /oauth/api/v1/backups/purge-range/{site.id} ### Description Purges a range of backups for a specific site. This endpoint allows you to specify the source of the backups and the range (from and to) of backups to be purged. ### Method PUT ### Endpoint `/oauth/api/v1/backups/purge-range/{site.id}` ### Parameters #### Path Parameters - **site.id** (string) - Required - The ID of the site for which to purge backups. #### Query Parameters None #### Request Body - **backup_source** (string) - Required - The source of the backups. Accepts: `local`, `wasabi`, `aws-s3`, `backblaze`, `dropbox`. - **from_backup** (string) - Required - The backup up to which you want the range of backups to purge to (the newest backup in the range). This backup can be either from manual or automatic backups and will be a string composed of a date, a time, and optionally a tag. e.g. `2021-11-25 08:59` or `2021-11-25 08:59 mytag`. - **to_backup** (string) - Required - The oldest backup in the range to purge. ### Request Example ```json { "backup_source": "wasabi", "from_backup": "2020-11-24 08:59 mytag", "to_backup": "2021-11-24 09:50" } ``` ### Response #### Success Response (200) No response body #### Response Example No response body ``` -------------------------------- ### PUT /oauth/api/v1/backups/purge-range/{site.id} Source: https://documenter.getpostman.com/view/13664964/TVssjU7Z/index Purges a range of site backups, from the oldest to the newest within the specified range. Use with caution. ```APIDOC ## PUT /oauth/api/v1/backups/purge-range/{site.id} ### Description Purge a range of backups. This will purge any backups between that range, be they automatic or manual backups. Please be careful. If you wish to keep a backup within that range of backups you wish to remove, then perform two purges. Purge a range up to the backup you wish to keep first. Then purge a range after the backup you wish to keep up to the final backup you wish to purge. ### Method PUT ### Endpoint `/oauth/api/v1/backups/purge-range/{site.id}` ### Parameters #### Path Parameters - **site.id** (integer) - Required - The ID of the site whose backups you want to purge. #### Request Body - **backup_source** (string) - Required - The source of the backup to be purged, accepts: `local`, `aws-s3`, `backblaze`, `dropbox`, `wasabi`. - **from_backup** (string) - Required - The backup from which you want the range of backups to purge to begin, i.e., the oldest backup in the range you want to purge. This backup can be either from the manual or automatic backups. This will be a string composed of a date, a time, and optionally a tag. e.g. `2021-11-24 08:59` or `2021-11-24 08:59 mytag`. - **to_backup** (string) - Required - The backup to which you want the range of backups to purge to end, i.e., the newest backup in the range you want to purge. This backup can be either from the manual or automatic backups. This will be a string composed of a date, a time, and optionally a tag. e.g. `2021-11-24 08:59` or `2021-11-24 08:59 mytag`. ### Response #### Success Response (200) No response body ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.