If we use the command mode, it would be easy to restore.
The code is as follows: |
Copy code |
Restore database [PoloSoft-Full] from disk = 'C:/Users/Administrator/Desktop/PoloSoft. Bak' With replace; |
Or you won't use the command mode. We can refer to the text below to restore it.
Create a database named TestBackup, create a table named Table1, this time for a complete backup, backup file: TestBackupDB-full.bak; then create table Table2 for differential backup, backup file is: testBackupDB-diff.bak; then create table Table3 and back up transaction logs (if the database sets recovery mode to simple, then the transaction log will not be visible in the backup type option), the backup file is: testBackupDB-log.bak;
Create a database named TestBackup2 to test the restoration of the backup file of the TestBackup database.
(Figure 1: create a database structure)
(Figure 2: backup type)
Below we can restore three backup files: TestBackupDB-full.bak, TestBackupDB-diff.bak, TestBackupDB-log.bak:
Step 1:Restore the full backup file TestBackupDB-full.bak, as shown in Figure 4 and Figure 5. After the restore is successful, the data list is shown in Figure 6 because of the recovery status options:Do not perform any operations on the database, and do not roll back uncommitted transactions. Other transaction logs can be restored. (Restore with norecovery)
(Figure 3: Go to SSMS to restore)
(Figure 4: conventional restoration)
(Figure 5: restore options)