How to check if Backup and Restore are completed successfully?
To make a full backup, run the BACKUP DATABASE command. First, specify the name of the database to back up, followed by the directory on the disk where the backup will reside.
The following example makes a backup of
test database and stores it in the
BACKUP database test TO "/tmp/backup";
The backup event can be checked using MV_EVENTS.
Backup can be validated using validate backup:
It can also be verified with the view information_schema.MV_BACKUP_HISTORY this table stores information about backups that have been made.
Example - this query shows the last successful backup:
SELECT backup_id, database_name, backup_path, lockfree_timestamp FROM information_schema.mv_backup_history WHERE status = 'Success' AND implementation = 'Lockfree' ORDER BY backup_id;
How to check if a backup is completed successfully?
The backup activity is logged in the memsql.log file under tracelogs on the Master Aggregator. You will see
Done taking a distributed backup for database when the backup is completed successfully. If not fails with error code/reason.
Restores a database from a binary backup file. The following example shows restoring the test database into test2 using the backup file generated on /tmp/backup.
restore database test as test1 from "/tmp/backup/";
This activity is also captured under MV_EVENTS.
How to check if Restore is completed successfully?
Once restore is completed without any errors, it writes
Done restoring from backup of database For example: