> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # DeleteBackup # Package: operations # Namespace: BackupService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/cms/operations/backups/delete-backup.md ## Permission Scopes: Manage Data Backups: SCOPE.DC-DATA.MANAGE-BACKUPS ## Introduction Deletes a backup. The process of deleting a backup takes time. You can check whether a backup has been deleted successfully with List Backups. --- ## REST API ### Schema ``` Method: deleteBackup Description: Deletes a backup. The process of deleting a backup takes time. You can check whether a backup has been deleted successfully with List Backups. URL: https://www.wixapis.com/wix-data/v2/backups/{backupId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: backupId Method parameters: param name: backupId | type: none | required: true Return type: DeleteBackupResponse EMPTY-OBJECT {} ``` ### Examples ### Delete a backup ```curl curl -X DELETE \ 'https://www.wixapis.com/wix-data/v2/backups/df941cc7-603e-4926-8034-8d8dc5025325' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.operations.BackupService.deleteBackup(backupId) Description: Deletes a backup. The process of deleting a backup takes time. You can check whether a backup has been deleted successfully with List Backups. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: backupId Method parameters: param name: backupId | type: string | description: GUID of the backup to be deleted. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteBackup ```javascript import { backups } from '@wix/data'; async function deleteBackup(backupId) { const response = await backups.deleteBackup(backupId); }; ``` ### deleteBackup (with elevated permissions) ```javascript import { backups } from '@wix/data'; import { auth } from '@wix/essentials'; async function myDeleteBackupMethod(backupId) { const elevatedDeleteBackup = auth.elevate(backups.deleteBackup); const response = await elevatedDeleteBackup(backupId); } ``` ### deleteBackup (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { backups } from '@wix/data'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { backups }, // Include the auth strategy and host as relevant }); async function deleteBackup(backupId) { const response = await myWixClient.backups.deleteBackup(backupId); }; ``` ---