One, create a database backup
1. Command execution
BACKUP DATABASE [aa] TO
DISK = N'H:\aa.bak'
WITH NOFORMAT, INIT, NAME = N'aa-完整 数据库 备份', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10
GO
2. Window execution
2.1 Call up the window
Before starting, please create an empty database
Select the database to be backed up, right-click-Task-Backup
2.2 Basic configuration
Here are basically the default, of course, you can customize it as you wish. Generally speaking, you have more needs for disk location modification.
2.3 bak configuration
Select Options
You can add backup data to the original bak file, or you can create a new bak file to store data
2.4 Select the storage location of the disk
Add to--…
To add data to an existing bak file, select the file directly and confirm
To create a new bak file to store data, select the path and customize a file name
2.5 Click OK to start backup
After the configuration is complete, click directly to confirm to complete the backup. The location of the backup file can be queried according to the customized disk path
Second, restore the database backup
1. Command execution
RESTORE DATABASE [aa] FROM
DISK = N'C:\aa.bak'
WITH FILE = 1, MOVE N'tmp' TO N'F:\DATA\aa.ndf', MOVE N'tmp_log' TO N'F:\DATA\aa.ldf', NOUNLOAD, REPLACE, STATS = 10
GO
2. Window execution
2.1 Call up the window
Select the database you want to restore the backup, right click the mouse-task-restore-database
2.2 Basic configuration
Add——...
Note: If you click Confirm at this time, an error will be reported
2.3 Option configuration
2.4 Click OK, the backup is complete
Summary: Although the process is simple, it still needs to be patiently explored, recorded in time, and consolidated