Dưới đây là script backup toàn bộ database dành cho bạn nào chạy game Server c#
Trước khi backup nhớ tạo folder C:\Backup\Backup
Ae chỉ cần copy nội dung vào và chọn Execute là database sẽ được Backup lại
USE [master]
BACKUP DATABASE [AgengSession] TO DISK = N'C:\Backup\Backup\AgengSession.bak' WITH NOFORMAT, NOINIT, NAME = N'AgengSession-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [BettingGameCore] TO DISK = N'C:\Backup\Backup\BettingGameCore.bak' WITH NOFORMAT, NOINIT, NAME = N'BettingGameCore-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [BettingGameCore.History] TO DISK = N'C:\Backup\Backup\BettingGameCore.History.bak' WITH NOFORMAT, NOINIT, NAME = N'BettingGameCore.History-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [CskhSession] TO DISK = N'C:\Backup\Backup\CskhSession.bak' WITH NOFORMAT, NOINIT, NAME = N'CskhSession-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [DbitSecurityService] TO DISK = N'C:\Backup\Backup\DbitSecurityService.bak' WITH NOFORMAT, NOINIT, NAME = N'DbitSecurityService-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [DWConfiguration] TO DISK = N'C:\Backup\Backup\DWConfiguration.bak' WITH NOFORMAT, NOINIT, NAME = N'DWConfiguration-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [DWDiagnostics] TO DISK = N'C:\Backup\Backup\DWDiagnostics.bak' WITH NOFORMAT, NOINIT, NAME = N'DWDiagnostics-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [DWQueue] TO DISK = N'C:\Backup\Backup\DWQueue.bak' WITH NOFORMAT, NOINIT, NAME = N'DWQueue-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
go
Xem toàn bộ nội dung ở bên dưới.
Trước khi backup nhớ tạo folder C:\Backup\Backup
Ae chỉ cần copy nội dung vào và chọn Execute là database sẽ được Backup lại
USE [master]
BACKUP DATABASE [AgengSession] TO DISK = N'C:\Backup\Backup\AgengSession.bak' WITH NOFORMAT, NOINIT, NAME = N'AgengSession-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [BettingGameCore] TO DISK = N'C:\Backup\Backup\BettingGameCore.bak' WITH NOFORMAT, NOINIT, NAME = N'BettingGameCore-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [BettingGameCore.History] TO DISK = N'C:\Backup\Backup\BettingGameCore.History.bak' WITH NOFORMAT, NOINIT, NAME = N'BettingGameCore.History-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [CskhSession] TO DISK = N'C:\Backup\Backup\CskhSession.bak' WITH NOFORMAT, NOINIT, NAME = N'CskhSession-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [DbitSecurityService] TO DISK = N'C:\Backup\Backup\DbitSecurityService.bak' WITH NOFORMAT, NOINIT, NAME = N'DbitSecurityService-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [DWConfiguration] TO DISK = N'C:\Backup\Backup\DWConfiguration.bak' WITH NOFORMAT, NOINIT, NAME = N'DWConfiguration-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [DWDiagnostics] TO DISK = N'C:\Backup\Backup\DWDiagnostics.bak' WITH NOFORMAT, NOINIT, NAME = N'DWDiagnostics-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
BACKUP DATABASE [DWQueue] TO DISK = N'C:\Backup\Backup\DWQueue.bak' WITH NOFORMAT, NOINIT, NAME = N'DWQueue-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10;
go
Xem toàn bộ nội dung ở bên dưới.
Last edited: