Introduction
If you have the "Mount Backup Drive as Needed" option enabled, cPanel reads the /etc/fstab
configuration and looks for a configuration that matches the backup directory that you have configured in the Backup Configuration interface of WHM. It then uses the configuration from the /etc/fstab
file to mount the disk that is configured to mount to your backup directory. When the backup and additional destination transport processes have completed, cPanel automatically unmounts the backup disk.
Procedure
- Log in to WHM as the root user.
- Navigate to Home » Backup » Backup Configuration.
- Check to see what directory you have set for "Default Backup Directory" and "Backup Staging Directory".
- If those directories are not set properly update them to the path of the directory that will be used to mount your backup disk. They are usually set to the same directory unless you have a special use case outside of the norm.
- Log in to the server via SSH as the root user, or use the Terminal feature in WHM as the root user.
- Create a backup of the
/etc/fstab
configuration so that you can restore it if a mistake is made:cp -v /etc/fstab{,$(date +.%Y-%b-%d-%H-%M-%S)}
- Open the
/etc/fstab
file with the text editor of your choice.WARNING: Making a mistake in the
/etc/fstab
configuration can result in a failure of the server to boot. Do not edit this file unless you are fully confident in your ability to modify this file safely. If you have any reservations or concerns about making this edit on your own, you must reach out to a systems administrator with the skills, training, and expertise required to make the edit for you. - Create a mount configuration that will mount your backup disk to the same directory that you have set in your cPanel backup configuration. You may use the
noauto
option to prevent this disk from being mounted when the server boots so that cPanel can mount and unmount the disk as needed. If you need help with determining how to make this configuration, review the manual page for fstab: man fstab, or contact a systems administrator. - Once the
/etc/fstab
file has been updated, go back to the Backup Configuration interface in WHM and put a checkbox next to the option labeled "Mount Backup Drive as Needed". - Click the "Save Configuration" button at the bottom of the Backup Configuration interface in WHM.
- For testing, you can force cPanel to run a backup outside of the normal schedule with the following command via SSH as the root user:
/usr/local/cpanel/bin/backup --force
Comments
0 comments
Article is closed for comments.