Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

NFS mount and cpanel backup

Posted on 2007-12-05
5
Medium Priority
?
1,513 Views
Last Modified: 2008-09-17
Hello,

We want to implement NFS mount and do backups via NFS mount in cpanel servers. We want to know
whether there is any risks in doing this. Is it stable?

Can we use NFS for backing up cpanel servers ?

We want to know whether is there any advantages or disadvantages of using NFS
to have cPanel backup. Will it cause the server to crash?

Any help will be appreciated.... Thanks in advance ....

--
Regards,
Anusha
0
Comment
Question by:crucialtest
  • 2
5 Comments
 
LVL 3

Expert Comment

by:yhetti
ID: 20414631
You want to mount the cpanel site tree via NFS on a third server and copy it over?  As in,

ServerA = Hosting server
ServerB = Backup

serverb> mount -t nfs servera:/home/sites/ /mnt/nfs/sites
serverb> tar -cvzf /backups /mnt/nfs/sites

?  Is that correct?

It should work with no difficulty/side effects, though honestly I'd suggest rsyncd instead.  Less overhead and it will only copy changes.  Very easy to set up, also.

0
 

Author Comment

by:crucialtest
ID: 20414733
Hello,

Thanks for the updates.
We want to use NFS mount and backup system in our new servers with cpanel. The thing i want to know is about any disadvantage in using NFS????

WE have heard a few mixed comments about this, saying thats its not stable and it is risky.

--
Regards,
Anusha
0
 
LVL 3

Accepted Solution

by:
yhetti earned 500 total points
ID: 20414895
There's always a certain amount of risk, but you can mitigate it pretty easily.

1) make sure squash_root is enabled (I believe it's by default, but do it explicitly)
2) Use NFS over TCP and firewall that port for everything except the backup server
3) Use NFS3 or 4 over older versions.  NFS4 should be on any new distros
4) Export the mount point as read only (ro)

The disadvantage to using NFS over something designed for backups (such as rsync):
- NFS tends to be slower
- Depending on the config, if the network is sluggish or there are problems with one of the machines, both of them could slow down (the client machine could lock up completely if you try to access an NFS share that's unavailable)
- Every backup will copy the entire directory tree, not just changes.
- There *could* be some problems with simultaneous access, but it's unlikely.
- portmap and RPC are traditionally greater security risks than rsync or even scp -R; that's not to say they *are* bigger risks, just that in the past they have been.
- THe users in /etc/passwd have to match, or you have to use ugidd, OR turn on no_root_squash, in order to get to all the files (you access NFS via minimum security, as opposed to rsync, which you can run as root only as needed.)

0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question