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 -
- Backup frequency - daily, at 1AM (assumed lowest traffic point in a 24 hour timeframe), via a cron job.
- 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).
- 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).
- 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.
- Mount the new snapshot (with no uuid option).
- Unfreeze XFS - xfs_freeze -u
- Unlock mongodb and re-open all elasticsearch indexes. Main server becomes functional again.
- 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). - 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?