Backup file deletion


We have created database backup with the help of the below query.

BACKUP DATABASE ddbname TO "/part1/memsql-data/da_backup

Now we have multiple backup files present in the server and we want to delete a few of them.
I know the query SELECT * FROM information_schema.MV_BACKUP_HISTORY ORDER BY Backup_Id; list available backup file with backup ID.
Can anyone know the query to delete backup with the ID?
Please note we haven’t installed memsql-ops cli.



When you make a full backup, MemSQL stores the backup files on the master aggregator and on the leaves (in the directory you specify using the BACKUP DATABASE command) . To delete a full backup, delete this directory from the master aggregator and the leaves. Note: To delete an incremental backup, you should not delete the directory where the incremental backup is stored, because it may contain other incremental backups.

You can remove the records in information_schema.MV_BACKUP_HISTORY by running the CLEAR BACKUP HISTORY command.

For more information on backing up and restoring data, including full and incremental backups, see our docs.


Hi Sschwarz,

Thanks for updating the thread. I have already gone through the document, but I am not seeing a query to delete the backup based on the backup_id. Could you provide a query to delete a backup based on the backup_id?

thanks a lot.

Hi Scott,

Please provide an update on this?

Hi Scott,

The thread opened 5days before but still no update from Memsql support :frowning:

It is not currently possible to delete a backup through a command in the database. This needs to be done and managed outside the database by deleting the files on disk.