Register for your free account! | Forgot your password?

You last visited: Today at 11:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Database backup

Discussion on Database backup within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Database backup

There is this way.
Code:
            if (!System.IO.Directory.Exists("C:\\Database\\BackUp"))
                System.IO.Directory.CreateDirectory("C:\\Database\\BackUp");
            string date = DateTime.Now.Hour + "-" + DateTime.Now.Minute + "-" + DateTime.Now.Second + "-" + DateTime.Now.Day + "-" + DateTime.Now.Month + "-" + DateTime.Now.Year;
            if (!System.IO.Directory.Exists("C:\\Database\\BackUp\\Accounts_" + date))
                System.IO.Directory.CreateDirectory("C:\\Database\\BackUp\\Accounts_" + date);

            string[] Files = System.IO.Directory.GetFiles("C:\\Database\\Accounts");
            foreach (string Account in Files)
            {
                string[] New = Account.Split('\\');
                System.IO.File.Copy(Account, "C:\\Database\\BackUp\\Accounts_" + date + "\\" + New[New.Length - 1]);
            }
It's working and all, but isn't ther any better ways? To me this looks ineffecient.
BaussHacker is offline  
Old 09/28/2011, 18:25   #2
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,192
Well... if you think about it- when you copy a folder in explorer.exe, it transfers documents one by one. Really it's the only way to do it. I did find this though:



It looks similar to what you have.
(Ignore the title of the thread, it might not be the best way at all)
I saw one in there that also uses process (which is weird). I doubt that one works.
Spirited is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Release]Database Backup
06/21/2011 - Shaiya PServer Development - 5 Replies
I threw this together so I could automate Database backups every 3 days or so. All you have to do is set Task Scheduler to run this whenever you want it to backup your db and it'll do it o.o you can also just run the Backup.bat to do it whenever you want <.< Uhm, modify the DBBackup.sql script to fit your database if needed, and you can check both files. :D If you get "osql is not recognized as an internal command" or whatever from it, then you need to google the fix, usually just...
[Frage] Database Backup !
04/16/2011 - Flyff Private Server - 12 Replies
Ich wollte fragen wie man Backups von der Database macht also Da ich immer gehackt werde muss ich immer wieder ein Wipe machen und das kotzt mich an ;D Deswegen wollte ich fragen wie man das macht. Sedrika's Lucidsoft DB Manager Tool klappt nicht da ich immer ein Error bekomme. meine Config: Und der Error ist : Error: Loggin_01_DBF not Found oder sowas und wenn ich ein Haken bei Loggin weg mache dann kommt genauso bei Character: Error: Character_DBF not Foun oder sonnst was ]:. Und...
[Help] Auto Backup Database
02/26/2010 - EO PServer Hosting - 13 Replies
Help!! I need Auto Backup Software after 15 minutes or 30 minutes...Who have it... i m try to use search button..but not found... who have it..can release.:handsdown::handsdown::handsdown:
REQUEST A Database Backup
07/16/2009 - CO2 Private Server - 1 Replies
ok im looking for the fixed DB of CoDarkness umm for some reason the one they gave out isnt working
need database backup
02/28/2008 - Conquer Online 2 - 0 Replies
probally wrong place to ask, but... Does anybody have conquer database postgres>PGAdmin backup? I can't download the previous ones in this forum. I need a working link. i need this database, what is in this topic: http://www.elitepvpers.com/forum/co2-guides-templa tes/77502-make-your-own-server.html



All times are GMT +1. The time now is 11:21.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.