在Ubuntu上恢复SQL Server数据库,可参考以下方法:
sqlcmd工具,执行RESTORE DATABASE [数据库名] FROM DISK '/备份文件路径' WITH REPLACE, RECOVERY命令。RESTORE DATABASE [数据库名] FROM DISK '/差异备份文件路径' WITH NORECOVERY,最后用RESTORE DATABASE [数据库名] FROM DISK '/后续差异备份文件路径' WITH RECOVERY。RESTORE LOG [数据库名] FROM DISK '/事务日志备份文件路径' WITH RECOVERY。恢复前要确保备份完整,可先备份现有数据,且操作可能覆盖现有数据,建议在低峰时段进行。