1

Where should I store my db backups in Centos 7? Are there any best practice for this?

Should I put them in /var/lib/<app>/backups as suggested in this answer?

3 Answers 3

4

Put them wherever you'd like. As long as they're also copied elsewhere, preferably off-site. The only thing approaching a "best practice" here would be to put the backups on their own filesystem, so they don't fill up the root filesystem and cause problems.

0

backup should be on separate file-system, preferably on separate LUN so that we can avoid disk failure scenario.

0

Best practice is to keep backups on a separate host or on cloud, you have not mentioned DB name ex: mysql, mongo etc, you can dump daily backup and then rsync to another system which will help you to recover data if hardware failure what if your server hdd dies if you keep the data in the same server you risk loosing data

Another option is to add data to cloud storage like AWS-S3 you can try free tier of AWS for one year which includes S3 if your data meets S3 free tier size, you can setup crons to upload the data on daily basis using s3cmd on linux systems

Still if you want to keep data in your in-house server i would recommend attaching an additional internal drive or portable drive to the server and keep data in that drive at-least there is very less chance that both drives would fail at same time

Not the answer you're looking for? Browse other questions tagged .