Backups ======== .. role:: green Control the automatic backup service for a slice via API. List Backups for a Slice ------------------------ **Type:** :guilabel:`GET` .. py:function:: https://cloud.syminet.com/api/v1/slices/{SLICE_ID}/backups List current backups for ``SLICE_ID``. **Required URL Parameters:** SLICE_ID Slice ID to list backups for. .. code-block:: shell :caption: Curl curl --request GET \ --url https://cloud.syminet.com/api/v1/slices/SLICE_ID/backups \ --header "authorization:bearer $API_TOKEN" .. code-block:: json :caption: Response { "data": [ { "backup_full_size": 50, "backup_id": 15159, "created": "2025-02-01 17:19:36.925397", "duration": "49s", "name": "automatic" }, { "backup_full_size": 50, "backup_id": 15222, "created": "2025-02-04 17:19:36.925397", "duration": "56s", "name": "automatic" }, { "backup_full_size": 50, "backup_id": 15095, "created": "2025-02-07 17:19:36.925397", "duration": "55s", "name": "automatic" } ] } Restore a Slice from Backup --------------------------- **Type:** :guilabel:`POST` .. py:function:: https://cloud.syminet.com/api/v1/backups/{SLICE_ID}/restore/BACKUP_ID Restore ``SLICE_ID`` from ``BACKUP_ID``. .. Caution:: All slice data is replaced with the ``BACKUP_ID`` image. **Required URL Parameters:** SLICE_ID Slice ID to restore. BACKUP_ID Backup ID to restore from. .. code-block:: shell :caption: Curl curl --request POST \ --url https://cloud.syminet.com/api/v1/backups/SLICE_ID/restore/BACKUP_ID \ --header "authorization:bearer $API_TOKEN" **Response:** :green:`202 OK` Enable Backups for a Slice -------------------------- **Type:** :guilabel:`GET` .. py:function:: https://cloud.syminet.com/api/v1/slices/{SLICE_ID}/backups/enable Enable automatic backups for ``SLICE_ID``. **Required URL Parameters:** SLICE_ID Slice ID to power on / boot. .. code-block:: shell :caption: Curl curl --request GET \ --url https://cloud.syminet.com/api/v1/slices/SLICE_ID/backups/enable \ --header "authorization:bearer $API_TOKEN" **Response:** :green:`202 OK` Disable Backups for a Slice --------------------------- **Type:** :guilabel:`GET` .. py:function:: https://cloud.syminet.com/api/v1/slices/{SLICE_ID}/backups/disable Disable backups for ``SLICE_ID``. .. Note:: When backups are disabled for a slice, there is a 72 hour "cool down" period before they can be enabled again. This is to prevent "overlap" from happening in the backup system. **Required URL Parameters:** SLICE_ID Slice ID to return. .. code-block:: shell :caption: Curl curl --request GET \ --url https://cloud.syminet.com/api/v1/slices/SLICE_ID/backups/disable \ --header "authorization:bearer $API_TOKEN" **Response:** :green:`202 OK`