Complete Backup Questions

Discussion in 'Bukkit Help' started by Hunt800, Jun 12, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Hunt800

    So, I need to wipe my server. Obviously, before I do that, I want to make sure that I have all of my stuff backed up so that players don't lose anything. However, I've got a few questions just to make sure I don't leave anything out. The server is an Ubuntu Linux computer and has many plugins (some of which use MySQL), and I'd really appreciate if anyone could answer the following questions:
    1. What directory do I need to back up to preserve all of my MySQL stuff (ie, iConomy Money, LogBlock, etc). I'm assuming the database is not kept in the Bukkit folder, but I honestly don't know much about MySQL
    2. I plan on backing up my folder that contains the CraftBukkit.jar (plus all of its subfolders, like Plugins and World), all of the MySQL data (refer to question 1), as well as writing down my internet configuration to make setting up a static IP easy as pie; is there anything else I need to back up?
    3. If any of you have gone through a full computer wipe, and you have any other advice to offer, what can you tell me?
    I understand some of these questions are probably rather simple, I would just like to be as safe as possible before I do anything as risky as this.
     
  2. Offline

    nickrak

    Instead of manually backing up the database files, take a look at the mysqldump utility. It will generate a .sql file that you can execute on your new database server after the wipe to rebuild the entire database. Then you won't have to worry about getting the configs all perfectly matching.

    If you've written yourself any cron jobs or init.d scripts, make sure you grab those before the wipe.

    You haven't said why you're doing a full wipe, so my only advice would be don't unless you absolutely have to. Linux doesn't have the self-degradation problems that Windows has, so if you can avoid the wipe, I'd be sure to exhaust all other alternatives to a wipe if you can.
     
    Hunt800 likes this.
  3. Offline

    Hunt800

    CRAP! Forgot to enter a .dump location when I ran mysql dump... Am I screwed?
     
  4. Offline

    nickrak

    no, you can just run it again, mysqldump doesn't erase the existing database, it just makes a .sql script to rebuild it.
     
    Hunt800 likes this.
  5. Offline

    Hunt800

    I ran it again, but it didn't go through all of the lines of stuff like it did the first time. I'm assuming that's normal since I had just entered the wrong command first?
     
  6. Offline

    nickrak

    the complete command should look something like this, and should NOT change the database itself, only duplicate.
    The output you saw was what was supposed to go into the file. You should NOT see output if you do it correctly.
    The second command 'cat mysqldump.dump' should show you that output as confirmation that it did work.

    Code:
    mysqldump -u root -A > mysqldump.dump
    cat mysqldump.dump
    
    then to restore on the other end

    Code:
    mysql -u root < mysqldump.dump
    
     
  7. Offline

    Hunt800

    All right, thank you very much.
     
Thread Status:
Not open for further replies.

Share This Page