this is pointless lol. why don't you just parse player details from sql? instead of writing text files to sql for backup purposes.
|
|
Hey.
Everytime you logout, you can now safe your characterfile including the exact time and date online aswell.
Which is very handy for if you get hacked you can restore someones account to just before he/she is hacked.
I know for big server's that this will take pretty much database space, BUT the characterfiles are really small
i already have a few thausand in my database, and its not even 25% yet. And you can empty the database each month/3 months.
Im doing this aswell and i've used it 3 times already, i couldnt live without it!
Example of how it looks like in the database:
Example of how the characterfile looks like in the database:
I'm selling this system for 8$ each!
Add me on skype: julian.kuitert
this is pointless lol. why don't you just parse player details from sql? instead of writing text files to sql for backup purposes.
How is my reply rendered "useless"? A more efficient way of handling backups would be to parse all the player details from SQL. Then each time a player logs out, make the server create a new record for the save based on the logout time. This way, you could just export all the ACTUAL saves from a certain date instead of exporting text files from a redundant database.
Or you could use a database the correct way and just have a cron job back it up to say amazon e3 every day.
OT
written in rely box and you want to charge people for it?Code:try(PreparedStatement ps = connection.prepareStatement("insert into backups(username, backup) values(?, ?)")) { ps.setString(1, player.username); ps.setString(2, FileUtils.readFileAsString(new File("/characters/" + player.username + ".txt")); ps.execute(); }
| « Very simple CMS system (NEW: With bootstrap design) || MySQL, CSS, PHP. | OSRS - Article System [PHP/MySQL/PDO] » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |