Thread: PI | MySQL Backup Handler | Will save the character file online!

Results 1 to 9 of 9
  1. #1 PI | MySQL Backup Handler | Will save the character file online! 
    Old Webdeveloper
    Dondxon's Avatar
    Join Date
    Aug 2011
    Posts
    1,147
    Thanks given
    209
    Thanks received
    108
    Rep Power
    65
    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
    Do you need any PHP work done? Or are you looking for RSPS integrations? click [Only registered and activated users can see links. ].

    [Only registered and activated users can see links. ]

     

  2. #2  
    Super Donator
    Haskell Curry's Avatar
    Join Date
    Nov 2009
    Posts
    852
    Thanks given
    602
    Thanks received
    247
    Rep Power
    0
    this is pointless lol. why don't you just parse player details from sql? instead of writing text files to sql for backup purposes.
     

  3. Thankful user:


  4. #3  
    Old Webdeveloper
    Dondxon's Avatar
    Join Date
    Aug 2011
    Posts
    1,147
    Thanks given
    209
    Thanks received
    108
    Rep Power
    65
    Quote Originally Posted by LT Smith View Post
    this is pointless lol. why don't you just parse player details from sql? instead of writing text files to sql for backup purposes.
    Can you leave those useless reply's away?
    Do you need any PHP work done? Or are you looking for RSPS integrations? click [Only registered and activated users can see links. ].

    [Only registered and activated users can see links. ]

     

  5. #4  
    Super Donator
    Haskell Curry's Avatar
    Join Date
    Nov 2009
    Posts
    852
    Thanks given
    602
    Thanks received
    247
    Rep Power
    0
    Quote Originally Posted by Dondxon View Post
    Can you leave those useless reply's away?
    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.
     

  6. Thankful user:


  7. #5  
    Old Webdeveloper
    Dondxon's Avatar
    Join Date
    Aug 2011
    Posts
    1,147
    Thanks given
    209
    Thanks received
    108
    Rep Power
    65
    bump
    Do you need any PHP work done? Or are you looking for RSPS integrations? click [Only registered and activated users can see links. ].

    [Only registered and activated users can see links. ]

     

  8. #6  
    Old Webdeveloper
    Dondxon's Avatar
    Join Date
    Aug 2011
    Posts
    1,147
    Thanks given
    209
    Thanks received
    108
    Rep Power
    65
    bump
    Do you need any PHP work done? Or are you looking for RSPS integrations? click [Only registered and activated users can see links. ].

    [Only registered and activated users can see links. ]

     

  9. #7  
    Old Webdeveloper
    Dondxon's Avatar
    Join Date
    Aug 2011
    Posts
    1,147
    Thanks given
    209
    Thanks received
    108
    Rep Power
    65
    bump
    Do you need any PHP work done? Or are you looking for RSPS integrations? click [Only registered and activated users can see links. ].

    [Only registered and activated users can see links. ]

     

  10. #8  
    Respected Member

    Join Date
    Jan 2009
    Posts
    5,682
    Thanks given
    1,093
    Thanks received
    3,494
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by LT Smith View Post
    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

    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();
    }
    written in rely box and you want to charge people for it?
     

  11. Thankful users:


  12. #9  
    Old Webdeveloper
    Dondxon's Avatar
    Join Date
    Aug 2011
    Posts
    1,147
    Thanks given
    209
    Thanks received
    108
    Rep Power
    65
    Quote Originally Posted by Stuart View Post
    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

    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();
    }
    written in rely box and you want to charge people for it?
    I assume you guys cant understand that im trying to sell some of my work, and if you really feel like screwing this up then please post a snippet in the right section, instead of taking my thread down.
    thanks.

    /close this please.
    Do you need any PHP work done? Or are you looking for RSPS integrations? click [Only registered and activated users can see links. ].

    [Only registered and activated users can see links. ]

     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [PI] Points won't save to character file.
    By SpawnInsanity in forum Help
    Replies: 9
    Last Post: 10-23-2013, 08:52 PM
  2. [PI] questSet not saving to Character files?
    By Keepin_Green in forum Help
    Replies: 5
    Last Post: 10-02-2013, 04:30 AM
  3. Replies: 3
    Last Post: 08-27-2013, 05:35 AM
  4. [PI] IP saving in character files
    By Harambe_ in forum Snippets
    Replies: 4
    Last Post: 12-24-2010, 12:23 PM
  5. Replies: 8
    Last Post: 08-10-2010, 12:33 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •