要使用nfs备份的话,nfs服务器必须支持NFSv4。
目标URL应如下所示:
nfs://longhorn-test-nfs-svc.default:/opt/backupstore
安装nfs server
yum install -y rpcbind nfs-utils
vim /etc/exports
/data/nfs/ *(insecure,rw,sync,no_root_squash)
mkdir /data/nfs
systemctl enable rpcbind
systemctl enable nfs-server
systemctl start rpcbind
systemctl start nfs-server
exportfs -r
修改longhorn备份目标
- target:nfs目录地址
- secret:不用填
创建备份
查看备份
备份完成后,进入nfs目录,查看备份。