DataBase Backup Job [IMG GUIDE]

I'll take you all on.
Vicennium
Joined
May 11, 2004
Messages
3,252
Reaction score
6
Hi to all MU Server admin, this guide will help you backup your database using sql job agent.

Code:
DECLARE @file varchar(70)
SET @file = N'D:\BACKUP'+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

Above is the Script which will backup your database

now go to Start>All programs>Microsoft SQL Server>Enterprise Manager

Follow the image below.

Note: ON the Script above(the one has red color) it must exist or else the job will gives you a error.

1.
Liselotte - DataBase Backup Job [IMG GUIDE] - RaGEZONE Forums

2.
Liselotte - DataBase Backup Job [IMG GUIDE] - RaGEZONE Forums

3.
Liselotte - DataBase Backup Job [IMG GUIDE] - RaGEZONE Forums

4.
Liselotte - DataBase Backup Job [IMG GUIDE] - RaGEZONE Forums

5.
Liselotte - DataBase Backup Job [IMG GUIDE] - RaGEZONE Forums

6.
Liselotte - DataBase Backup Job [IMG GUIDE] - RaGEZONE Forums

7.
Liselotte - DataBase Backup Job [IMG GUIDE] - RaGEZONE Forums

8.
Liselotte - DataBase Backup Job [IMG GUIDE] - RaGEZONE Forums


Ok, when you finish, you may Right Click the Job and select Start Job
The job continue to occure depends on the Occure Time you set for that Job.

Credits:
mafiux for the new script
DWT
 
Last edited:
Very nice indeed liselotte, now if someone doesn't get this guide it's pretty much impossible to help that person xD.
 
Does this overwrite the files? I mean, If you backup every 3 hours will the second backup overwrite the first one?

Im still looking for the perfect backup method like explained on this post: http://forum.ragezone.com/mu-server-client-help/help-what-best-backup-methods-206598.html

I already have the program seted to upload the file to my hosting automaticly and would like to make a guide on how to have safe backups so people stop loosing their servers ^^

Edit: Added to Rz Guide Center
 
Last edited:
yep, it take only 2-4 secs to fully backup the database.
 
on the job it says fail... i dont know why, i made a folder and put the database bacup on it,D:/muserver/db backs/muonline.bak, but still its failed, any posible problem on me?... i will appreciate someone help me...
 
Re: [Guide] DataBase Backup Job [IMG GUIDE]

well i have suggestion for you... just go to your database right click just like what you do when you are restoring and choose backup then point it to your backup files or MuOnline.bak then click schedule then choose when you want to set it up...
 
Re: [Guide] DataBase Backup Job [IMG GUIDE]

change the Directory to C:\xxx\xxx instead of D:\xxx\xxx
 
Back