1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Addon for database backup

Discussion in 'Add-on Requests [Archive]' started by onthefly, Oct 11, 2011.

  1. onthefly

    onthefly Active Member

    Veer likes this.
  2. SchmitzIT

    SchmitzIT Well-Known Member

    It's not a XF mod, but my host pointed me at mySQL Dumper the other day.
     
    borbole likes this.
  3. principia

    principia Well-Known Member

  4. onthefly

    onthefly Active Member

    No addon? The addon with Vb is so nice and easy, wish there was one similar to the one done by Paul M. :(
     
    Brett Peters likes this.
  5. borbole

    borbole Well-Known Member

    It is a great tool. I use it quite a lot and I have never had problems with it.

    If your db is small then it can be done that way, but when it grows then it would much better to do the backups through other means, like the mysqldumper mentioned above or through SSH or Telnet, providing your host allows such connection.
     
  6. xfrocks

    xfrocks Well-Known Member

    For any MySQL backup, restore work, I prefer doing this in console/ssh:

    Backup
    Code:
    mysqldump -u <username> -p <database-name> > backup.sql
    (you will be asked for password, input then press enter then wait)

    Restore
    Code:
    mysql -u <username> -p <database-name> < backup.sql
    (you will be asked for password too)

    Works well with gigabytes backup (raw .sql). You can gzip the .sql file later to download etc.
     
    Andy.N likes this.
  7. Andy.N

    Andy.N Well-Known Member

    Would restore step drop all the tables in the database-name before uploading it? Or it will just overwrite/update?
     
  8. principia

    principia Well-Known Member

  9. xfrocks

    xfrocks Well-Known Member

    Nope. But you can do that this way

    Code:
    mysqldump --add-drop-database -u <username> -p <database-name> > backup.sql
    More info: http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
     
    SchmitzIT likes this.
  10. SchmitzIT

    SchmitzIT Well-Known Member

    I used to use this approach as well. However, this does require access to the account running the mySQL process. On our new VPS I did not have this, and the mySQLDumper script forms a (for me) perfect alternative for it, without requiring me to shell into the box.
     
  11. onthefly

    onthefly Active Member

    Why do I get this error when trying to do a backup in ssh?

    mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
     
  12. Dodgeboard

    Dodgeboard Well-Known Member

    Sypex Rocks! It's has an integration add-on for Xenforo that lets you do your backup right from the AdminCP. Works slick too, even with BIG databases. I use it daily.

    Untitled.jpg
     
    Trekkan and Floris like this.
  13. SchmitzIT

    SchmitzIT Well-Known Member

    Now that looks slick indeed.
     
  14. Dodgeboard

    Dodgeboard Well-Known Member

    The cool thing is, it does not require extra authentication. Plus, it's FASSSSTTTTT! Takes me about 1 minute to backup my 300mb database. Then you can even choose to download it. It's probably my most used, and most beneficial add-on for XF.

    I even use it to sync databases between my live board and my dev board. I can't say enough about it....and it's FREE! :D
     
    Andy.N likes this.
  15. Andy.N

    Andy.N Well-Known Member

    Sounds like it will be on my to-install list.
    Can't you just schedule it to email/download/FTP somewhere instead of manually doing it.
     
  16. Dodgeboard

    Dodgeboard Well-Known Member

    I don't know about the scheduling. I don't think so. It doesn't use a cron. But it only takes one click <execute>. There are some advanced settings in the ses.php and cfg.php files, but I've not really played with them much.

    I like the manual part about it - that way, when I make a change or get ready to apply an upgrade, I can make a quick backup in seconds right from the admincp and right before making the plunge.
     
  17. SchmitzIT

    SchmitzIT Well-Known Member

    I just played with mySQLDumper this morning, and discovered it also supports multiple databases. On our main site, we have a database for the forums, and one for the wiki, and thus the Sypex might not be ideal for us for that purpose.And from what I saw, scheduling is possible using mySQLDumper by means of cron jobs, which would also be somewhat essential for my needs.

    But yes, I will probably be using Sypex on some of my sites anyway. It looks too cool not to :)
     
  18. Dodgeboard

    Dodgeboard Well-Known Member

    Just to clarify, Sypex does not have to be installed into the admincp and can be configured to backup multiple databases.
     
  19. Andy.N

    Andy.N Well-Known Member

    Can it backup multiple databases from multiple servers?
     
  20. Dodgeboard

    Dodgeboard Well-Known Member

    If you install it on the servers.
     

Share This Page