Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

SQL AutoDB backup without overwrite

Initiate Mage
Joined
Dec 1, 2004
Messages
1
Reaction score
0
Code:
DECLARE @file varchar(70)
SET @file = N'D:\MuOnline_'+REPLACE(REPLACE(CAST(getdate() AS varchar), ' ', '_'), ':', '_')
SELECT @file
BACKUP DATABASE [MuOnline] TO  DISK = @file WITH  INIT ,  NOUNLOAD ,  NAME = N'MuOnline backup',  NOSKIP ,  STATS = 10,  NOFORMAT

you can edit file location (SET @file = N'D:\MuOnline_'+REPLACE(REPLACE(CAST(getdate() AS varchar), ' ', '_'), ':', '_')) or make it work with any database ([MuOnline])

save this as step in SQL Server Agent.

Older file will not be overwrited when creating new one so you will need to delete old databases sometimes
 
Custom Title Activated
Loyal Member
Joined
May 26, 2005
Messages
1,042
Reaction score
6
i dont get what's the difference with my backup
 
Back
Top