Backup drives - mounted or not
Hi,
My question relates to having a separate drive for backups.
My server has 3 drives, 2 x 1TB drives setup in RAID1 for the actual OS and cPanel. Then a 3rd 2TB which I currently have mounted to /backup which performs daily, weekly and monthly incremental backups.
1. Is it best practice to select cPanel backup to automatically mount/un-mount the drive? Searched wide on this forum and it appears some prefer to leave it mounted, where others say it is best to have cPanel un-mount it in case of primary drive catastrophes, like say running rm -rf / (this is just a very bad example of catastrophe)
2. Currently, on a CentOS 7 running latest cPanel my /etc/fstab looks like this:
/dev/sdb1 /backup ext4 defaults 0 0
I saw an old article which suggested changing this to something like:
/dev/sda1 /backup ext4 defaults,noexec 0 0
will binaries actually run on the backup file system?
-
Hello, . Is it best practice to select cPanel backup to automatically mount/un-mount the drive? Searched wide on this forum and it appears some prefer to leave it mounted, where others say it is best to have cPanel un-mount it in case of primary drive catastrophes, like say running rm -rf / (this is just a very bad example of catastrophe)
This is more of a preference that depends on whether you want extra precaution in the event someone runs a command like the one you mentioned.. Currently, on a CentOS 7 running latest cPanel my /etc/fstab looks like this: /dev/sdb1 /backup ext4 defaults 0 0 I saw an old article which suggested changing this to something like: /dev/sda1 /backup ext4 defaults,noexec 0 0 will binaries actually run on the backup file system?
This is answered at: Backup Configuration FAQ - Documentation - cPanel Documentation Per that document: [LIST]- If you use a mounted filesystem to store backups, we strongly recommend that you mount the system with the noexec option. If you pass the noexec parameter to the mount parameter, the binaries cannot run on the mounted filesystem.
Thank you.0 - If you use a mounted filesystem to store backups, we strongly recommend that you mount the system with the noexec option. If you pass the noexec parameter to the mount parameter, the binaries cannot run on the mounted filesystem.
-
Hi Michael, Thank you for the information provided. As I understand the information provided, after the backup runs, the backup script should unmount the backup drive, correct? I have enabled this on my server (Mount Backup Drive as Needed), it says that it found the mount, but I cannot see that it unmounts the drive after the backup completes: ------------------------------------------- [2017-02-10 20:20:02 +0200] info [backup] Detected "/backup" in /etc/fstab [2017-02-10 20:20:02 +0200] info [backup] Mount found: /dev/sdb1 on /backup type ext4 (rw,noexec,relatime,data=ordered) [2017-02-10 20:20:02 +0200] info [backup] Setting I/O priority to reduce system load: unknown: prio 0 [2017-02-10 20:20:02 +0200] info [backup] Hard Linking available on "/backup" [2017-02-10 20:20:02 +0200] info [backup] Starting incremental MySQL database backups [2017-02-10 20:20:06 +0200] info [backup] Running dir & file backup with target : /backup/incremental/system [2017-02-10 20:20:08 +0200] info [backup] System backups will not be uploaded to any remote destinations. [2017-02-10 20:20:08 +0200] info [backup] Running account backup with target : /backup/incremental/accounts [2017-02-10 20:20:08 +0200] info [backup] Queuing transport reporter [2017-02-10 20:20:20 +0200] info [backup] Completed at Fri Feb 10 20:20:20 2017 [2017-02-10 20:20:20 +0200] info [backup] Final state is Backup::Success (0) ------------------------------------------- 0 -
Hello, Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments