• 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

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

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

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

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.
 
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.
 
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.
Would restore step drop all the tables in the database-name before uploading it? Or it will just overwrite/update?
 
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

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.
 
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
 
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
 
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.
 
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.
 
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 :)
 
Just to clarify, Sypex does not have to be installed into the admincp and can be configured to backup multiple databases.
 
Top Bottom