Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Good practice to backup mariadb and files on server
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
DeIM
Apprentice
Apprentice


Joined: 11 Apr 2006
Posts: 256

PostPosted: Fri Jul 03, 2015 7:07 pm    Post subject: Good practice to backup mariadb and files on server Reply with quote

Hi, I'm still quite newbie in databases. I have development PC with mariadb installed.

What I need in quite near future is publish some webpages to ARM-based server(s). Let's say I'll publish to first ARM server now and to second after some time different pages.
I see problems with mariadb backups. I suppose the best way to backup mariadb from N servers is to setup N instances of mariadb slaves on development PC and at defined time use Percona XtraBackup incremental backup on them (i.e. on this slaves).

If it's not bad idea, how should I set several mariadb instances on Gentoo? (I use OpenRC).


For the second - backup of files.
I would use rsync. I know it uses incremental way, but is there any way how to achieve snapshot of data at exact time and make really incremental (or differential) backup? I mean save all files at the first backup and then save only differences to previous backup.


Please let me know if there are some interesting tools. I don't affraid to program some smaller tool myself if there is nothing already.

Thanks in advance :wink:
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Fri Jul 03, 2015 7:22 pm    Post subject: Reply with quote

Just use one database server, but different databases.

For backup purposes i set up a cron job which does a dump of the table which gets compressed and logrotated.

Just create a new entry for logrotate
Code:
/dumps/mybase.sql.gz {
        rotate 60
        daily
        nocompress
        nocopytruncate
        postrotate
          HOME=/root mysqldump --opt mybase | gzip > /dumps/mybase.sql.gz
        endscript
}


Filesystem backups are a bad idea when the DB server is running and processing. Only dumps are a good backup for running DB servers.
_________________
// valid again: I forgot about the git access. Now 1.2GB big. Start: 2015-06-25
git daily portage tree
Web: https://portage.schorsch-tech.de
git clone https://portage.schorsch-tech.de/portage.git
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum