Solved

NFS mount and cpanel backup

Posted on 2007-12-05
5
1,386 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 125 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

706 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now