简体   繁体   English

SQL Server 备份到远程服务器

[英]SQL Server Backup to a Remote Server

I realise there is a command:我意识到有一个命令:

BACKUP DATABASE [DB Name] TO DISK [PATH]

Is it possible to backup to a remote location?是否可以备份到远程位置? - EG the web server rather than the database server? - 例如网络服务器而不是数据库服务器?

Yes.是的。 Exactly the same syntax as the normal backup command, but replace the path as appropriate, eg:与普通备份命令的语法完全相同,但根据需要替换路径,例如:

BACKUP DATABASE [DB NAME] TO DISK [\\server\share\path]

There's an example on http://msdn.microsoft.com/en-us/library/ms179313.aspx that shows this. http://msdn.microsoft.com/en-us/library/ms179313.aspx上有一个示例说明了这一点。

You will need to make sure that the SQL server account is able to write files to the named path.您需要确保 SQL 服务器帐户能够将文件写入指定路径。

我创建了一个远程完整/事务备份模板,您可以试用它,它会在传输之前检查本地磁盘空间和远程磁盘空间。

git clone https://github.com/jnre/SQL_backupremote.git

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

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