您的位置:首页 > 其它

远程局域网备份(全备份)

2017-01-17 20:05 519 查看
1   我这个是作为自己的参考资料用的,因为比较重要,所以直接写博客上面,防止丢失,方便查找   

服务器端安装

a. 安装NFS服务器并实现挂载

a) 安装 NFS 服务器所需的软件包:

# yum install -y nfs-utils

 

b) 编辑exports文件

#vim /etc/exports

#/home/nfs/ 192.168.248.0/24(rw,sync)  

 

同192.168.248.0/24一个网络号的主机可以挂载NFS服务器上的/home/nfs/目录到自己的文件系统中

rw表示可读写;sync表示同步写

 

c) 启动nfs服务

#systemctl start rpcbind.service

#systemctl start nfs-server.service

 

d) 确认NFS服务器启动成功:

#rpcinfo –p

e) 若没有启动成功,重新启动rpcbind和nfs-server服务:

#systemctl restart rpcbind.service

#systemctl restart nfs-server.service

 

客户端安装

a) 安装nfs,启动rpcbind服务

# yum install -y nfs-utils

 

b) 先为rpcbind做开机启动

#systemctl enable rpcbind.service

 

c) 然后启动rpcbind服务:

systemctl start rpcbind.service

 

d) 检查NFS服务器端是否有共享目录:

# showmount -e 192.168.64.138

 

e) 在从机上使用mount挂载服务器端目录到客户端某个目录下(这里将上面本地备份的文件路径挂载如服务器里面):

#mount -t nfs -o nolock,nfsvers=1,vers=3 192.168.64.138:/home/nfs /backup

 

问题:mount.nfs: Stale NFS file handle

在client端把挂载文档去掉重新挂载:

# umount –a

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: