尝试了多种方法来进行备份。
尝试在容器中将 SA 添加为 root 用户
Azure 数据工作室
BACKUP DATABASE [PrestigeCars] TO DISK = N'/var/opt/mssql/backup//PrestigeCars-202044-8-4-52.bak' WITH NOFORMAT, NOINIT, NAME = N'PrestigeCars--2020-04-04T12:04:52', NOSKIP, REWIND, NOUNLOAD, STATS = 10
消息 3201,级别 16,状态 1,第 1 行
无法打开备份设备“/var/opt/mssql/backup//PrestigeCars-202044-8-4-52.bak”。操作系统错误2(系统找不到指定的文件。)。
消息 3013,级别 16,状态 1,第 1 行
备份数据库异常终止。
总执行时间:00:00:00.217
SSMS
backup database [PrestigeCars]
to disk = N'/var/opt/mssql/backup//PrestigeCars-202044-6-42-9.bak'
with noformat
, noinit
, name = N'PrestigeCars--20200404'
, noskip
, rewind
, nounload
, compression
, stats = 10;
SQLCMD
sqlcmd -S localhost,12001 -U SA -Q "BACKUP DATABASE [PrestigeCars] TO DISK = N'/var/opt/mssql/backup/CSCI331-Backup/PrestigeCars-202044-6-42-9.bak' WITH NOFORMAT, NOINIT, NAME = 'PrestigeCars-20200404', SKIP, NOREWIND, NOUNLOAD, STATS = 10"