This showcases how to perform manual, automated, and restore backups.
-
sql_store is the database I want to back up.
-
Set up the backup of the sql_store database into the path C:\polim\SQL\database_backup\sql_store_backup.sql on command prompt.
-
Successfully backup to the desired path.
-
Created a backup.bat file that backs up sql_store database and appends the current date to the backup file name.
This is the result after running the backup.bat each time.
-
Use Task Scheduler to automatically run the backup.bat file.
-
Set up a schedule for the backup.
-
Add the backup.bat file to run at the scheduled time.
-
A new database named sql_store_backup was created. Initially, the database is empty.
-
Created a restore.bat file and selected the database to be restored to the newly created database, sql_store_backup.
In this case, sql_store_backup.sql was chosen to restore to the database sql_store_backup.
-
Successfully restored to the database sql_store_backup.