0

I have a main server (dedicated CentOS 7, XFS file system, 2X1TB SSD, software RAID1) connected via LAN to my backup server (dedicated CentOS 7, XFS file system, 2X2TB HDD, software RAID1) in my setup.

I would appreciate a critique of my backup strategy.

Main points -

  1. Backup frequency - daily, at 1AM (assumed lowest traffic point in a 24 hour timeframe), via a cron job.
  2. Main server uses elasticsearch and mongodb - to start the backup proces, I first call fsync lock on both db's after flushing current write operations (elasticsearch - _flush (equivalent to lucene commit) followed by closing of all indexes, mongodb - fsync: 1, lock: true).
  3. After mongodb has locked and all elastic indexes have been closed, xfs_freeze -f is called (this freezes the XFS file system to prevent writes).
  4. Next I take a LVM (logical volume manager) snapshot - create a new LVM device using lvcreate command, and take a snapshot of the XFS filesystem.
  5. Mount the new snapshot (with no uuid option).
  6. Unfreeze XFS - xfs_freeze -u
  7. Unlock mongodb and re-open all elasticsearch indexes. Main server becomes functional again.
  8. Send mounted snapshot to backup server using rsnapshot (roughly rsync + versions).
    Delete t-7th day backup on backup server (I keep 7 versions t, t-1 day, ... t-6 days).
  9. Unmount and delete snapshot on main server.

I am concerned that main server will be in "stalled" state from the time of locking the db's, to the time they are made operational again. I dont know if this time is insignificant?
If it is not insignificant, how exactly does everyone overcome this problem of "backup stall"?

How important is it to encrypt data on backup server, given that backup server is not a shared entity?

How much time will be lost during decryption of encypted data, if a full restore of backup is required for, say, 1TB of encrypted backup data?

vjjj
  • 117
  • 4
  • Why are you taking backups in the first place? What risk(s) are you mitigating, and how much would it cost if those risks were realized? Under what conditions would a full restore make sense for you? (these are questions that will help inform your backup strategy). You may want to consider the Confidentiality, Integrity and Availability off the data in your answer. – Slartibartfast Nov 14 '17 at 06:50
  • MongoDB version and storage engine? – Markus W Mahlberg Nov 15 '17 at 08:42
  • Mongodb v3.4, storage engine - wiredtiger. – vjjj Nov 16 '17 at 00:04

0 Answers0