大网数据广告活动
服务器运维问答

ZFS backup advice with another server

· 52CE 我爱测

I currently have two servers both have the exact same hardware, disks, etc. One server (server1) is going to be the "main" server. It's basically a server with raidz2 that has SMB shares on it that people connect to. The other se…

问题原文

原帖链接 · Robert Goulet · CC BY-SA 3.0

I currently have two servers both have the exact same hardware, disks, etc.

One server (server1) is going to be the "main" server. It's basically a server with raidz2 that has SMB shares on it that people connect to.

The other server (server2) is configured the same as server1 (raidz2) but is only to be for backing up server1. It's meant to be an offsite backup in the event we lose server1 from disk failure, fire, water damage, etc.

I'm trying to figure out the best way to do the backups to server2.

At first, I was thinking something like rsync. This is trivial to set up in a cron, and I can have it go once a week.

Alternatively, I was thinking of something with zfs send/recv. My understanding is that ZFS can do "snapshots" so I thought it would be great if I can create snapshots/incremental backups without losing a lot of space. I feel like this could be more difficult to implement/prone to errors.

As I said before, both servers are configured the same in terms of hardware and raidz2 layout. What would you all recommend for my current situation?

社区高分解答

原帖链接 · fukawi2 · CC BY-SA 3.0

ZFS is very resilient. The most basic example of shipping a file system would be:

# zfs snapshot tank/test@tuesday
# zfs send tank/test@tuesday | ssh [email omitted] "zfs receive pool/test"

Note the snapshot prior to the send (and sending the snapshot).

You could wrap that up into a script to delete the local snapshot after you've sent it to the remote -- or keep it if you've got the disk space to be able to. Keep previous snapshots on the backup server.

Source and highly recommended reading: https://pthree.org/2012/12/20/zfs-administration-part-xiii-sending-and-receiving-filesystems/

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-12-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。