1、挂载异地共享文件夹
2、配置sqlserver自带备份方案
或者
1、自己写脚本做备份方案,配置到计划任务啥的都行,方法很多具体在自己百度测试!!!
sys.sp_configure @configname = 'allow_updates',
@configvalue = 0;
RECONFIGURE WITH OVERRIDE;
GO
sys.sp_configure @configname = 'show advanced options',
@configvalue = 1
RECONFIGURE
GO
sys.sp_configure @configname = 'xp_cmdshell',
@configvalue = 1
RECONFIGURE
GO
DECLARE @bakpath NVARCHAR(500)
SET @bakpath = '\\WIN-A6O73B***\bakFolder\SanF***190_bakup_' +
CONVERT(VARCHAR(10),GETDATE(),112) + '-' + REPLACE(CONVERT(VARCHAR(10),GETDATE(),108),':','') + '.bak'
EXEC master..xp_cmdshell "NET USE Z: \\WIN-A6O73B***\bakFolder 【此处填写你设置的密码】 /USER:dbbakuser"
BACKUP DATABASE SanFengNew TO DISK = @bakpath
GO
sys.sp_configure @configname = 'xp_cmdshell',
@configvalue = 0
RECONFIGURE
GO
sys.sp_configure @configname = 'show advanced options',
@configvalue = 0
RECONFIGURE
GO
sys.sp_configure @configname = 'allow_updates',
@configvalue = 1;
RECONFIGURE WITH OVERRIDE;
GO