简体   繁体   English

使用WITH FORMAT备份SQL Server数据库

[英]Backup SQL Server database using WITH FORMAT

I'm having a bit of trouble understanding the purpose of the WITH FORMAT option of the SQL Server BACKUP DATABASE command. 我在理解SQL Server BACKUP DATABASE命令的WITH FORMAT选项的用途时遇到了一些麻烦。

Using the MSDN example: 使用MSDN示例:

USE AdventureWorks2012;
GO

BACKUP DATABASE AdventureWorks2012
    TO DISK = 'Z:\SQLServerBackups\AdventureWorks2012.Bak'
       WITH FORMAT,
            MEDIANAME = 'Z_SQLServerBackups',
            NAME = 'Full Backup of AdventureWorks2012';
GO

I understand this deletes any existing backups and creates a new one. 据我所知,这会删除所有现有备份并创建一个新备份。

If I was to omit the WITH FORMAT line, and I already had a backup at Z:\\SQLServerBackups\\AdventureWorks2012.Bak , what does this mean to my backup? 如果我要省略WITH FORMAT行,并且我已经在Z:\\SQLServerBackups\\AdventureWorks2012.Bak进行了备份,这对我的备份意味着什么?

Is it incremental or does it overwrite with a full one? 它是增量的还是用完整的覆盖?

It's a full backup, essentially appended to the file if it exists already, you'll see a File number 2 reference when you run it, and you'll see the backup file double in size. 它是一个完整备份,基本上附加到文件(如果它已经存在),当你运行它时你会看到一个文件号2引用,你会看到备份文件的大小加倍。 Each backup is independent of each other and either can be restored. 每个备份彼此独立,可以恢复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM