Backup to NFS Mount Questions
-
Hi we do backups to nfs for the same space reasons. I don"t think you can use additional local directory as it"ll still back up locally first. We have the cpanel servers saving directly to the nfs server with incremental backups, they then copy the files to 2 remote locations. Our nfs is another vm in a vitalised environment on the same host, but I think nfs4 has better security. We restrict incoming ip"s on the nfs vm to justcthe host servers, then on the cpanel host servers allow the nfs. One thing, you may need to set no_root_squash in etc/exports, not usually recommended but without that we had permission errors especially if zipping the system files. Probably only affects incremental when system files are copied to remote. All in all it works well and solves the space issue on the cpanel vms. Unfortunately if you choose to retain the files on the nfs it"ll retain all of them, cpanel does not allow us to control what we retain. I guess you could create a cron script to delete some on the nfs? Hope this helps! 0 -
Hi @ronaldst While You can use NFS I do want to point out that we don't officially support it. This is noted here: Backup Configuration - Version 68 Documentation - cPanel Documentation You may want to be aware as well of the other warnings/info associated with different backup types as detailed in the above documentation. 0 -
Absolutely, cpanel doesn't support it, but for many years local backup space has been an issue. We virtualise servers to make better use of CPU resources to avoid leaving so much unused, so why have premium SSD and only be able to use half of it. Local backups are more problems than the risks of NFS. It'll check the local space at the beginning of the backup and fail the whole backup if not enough, how much is enough, if you use SSD on a 100mb connection, you need more as it backs up quicker than it transfers and crashes the server when full. At least with NFS that risk and management of space is removed. We can then have cpanel servers running at 80-90% capacity if required. OP another way which is more supported is to mount another drive to the cpanel server for backups (if you have a spare slot on dedicated) or a remote drive on virtual, but you need this for each VM whereas NFS mount can be shared - (different folders all allowed by IP) It's discussions like this which push development and ideas, so even though not supported, it's still a important area of hosting. 0 -
I am currently testing NFS mounting a backup directory now, and so far it seem to be working well. I am actually thinking that cPanel have not properly solved the challenges regarding backups with the current version of WHM. Being able to control the amount of locally stored backups is such a basic feature, and vital to space management on any server. Retention settings on remote destinations are working flawless, and different type of retentions can be set up for different types of backups. I am thinking that that retention settings of local and remote backups should be separated. Allow one type of retention on local storage, and another on remote storage. Alternatively, implementing a way of restoring backups from remote destinations, similar to the one available when files are stored in the local backup directory. I am thinking this would benefit most server setups using WHM, either being dedicated servers or virtual ones. Is there anything planned (within the development team) to update the backup system? 0 -
Hi yes I found a solution, it"s worked perfectly all year. I"ll check it and post back. Sorry I must have missed the last post last year! 0 -
Here you go /backupfolder 0.0.0.0(rw,sync,no_subtree_check,no_root_squash) Ensure your etc/export file on the nfs server has the above line, the no root quash resolves the permissions issue. It basically gives the server root rights within the backup folder. Replace the ip with the ip of the server you are backing up. Hope this helps! 0 -
I know this is an old thread, but I want to know how can you use NFS doing incremental backups, exported with sync. I've tried converting from compressed to incremental and it's extremely slow, unusable. It works fine for large files, but not for small ones. Converting to async solved my problem but I don't know if it's reliable enough to use it like this.
0 -
Netcrusher - as far as cPanel is concerned, our support for NFS hasn't changed, so you're welcome to try it but do some testing with your specific implementation first before you rely on it.
0 -
We used nfs for a while but it was slow and used too many resources.
We now use sshfs again, the latest version is ok with symlinks.
This has worked well for several years with incremental and is much easier to set up as you’re literally just using ssh to directly access a remote server
Here’s the command to load the folder
(You can also use fstab and ssh keys)sshfs -o nonempty -p 22 root@12.345.678.9:/root/remotefolder/ /localbackupfolder
0 -
Right now, I'm testing async NFS which works really well. Working with large files, NFS sync was also pretty ok. Thank you very much for your response and tips!
0 -
You’re welcome.
NFS has probably improved since we used it too.
If I remember right, with nfs you just have to be careful with ownership / permissions on the remote files when backing up cpanel users0 -
If you're using no_root_squash everything is owned by root, so there are no issues.
0 -
That rings a bell, I remember, it does 👍
0
Please sign in to leave a comment.
Comments
16 comments