This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

ZFS Snapshots and Replication vs RSync vs Unison

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
StylusPilot
NewUser
NewUser
Posts: 2
Joined: 16 Apr 2013 11:55
Status: Offline

ZFS Snapshots and Replication vs RSync vs Unison

Post by StylusPilot »

Hi,

coming from FreeNAS which had the ability to use ZFS Replication, is this something coming to NAS4Free

Can anyone shed some light on when's the best time to use Unison, RSync or ZFS Replication

* Which is better for lower speed links

* Which transfers less data

* Which is overall quicker

* Is there one more stable than others

Thanks

danic
Starter
Starter
Posts: 30
Joined: 26 Jun 2012 21:07
Status: Offline

Re: ZFS Snapshots and Replication vs RSync vs Unison

Post by danic »

To my knowledge ZFS Replication (zfs send / zfs recv? correct?) is available via command line. That ability does exist in nas4free.
As for which transfers less data, I believe rsync and zfs snapshots with zfs send/zfs recv will use the same amount of data, as they both have the options to send only data that has changed since last ran. But if you are dealing with large flat files, I bet zfs method would be more efficient. I have not tested it, but ZFS snapshots I think are block level not file level. So large files that change, ZFS should be able to send the new device level blocks instead of the whole file.

That's all I can add. Give each type a try and report back. Let us know what you find works best in your situation.
Danic
Nas4Free - AMD X4 960T - GIGABYTE 990FXA-UD3 - 16GB RAM - IBM M1015/IT - Intel RS2WC080/IT- 6x 3TB - 4x 320GB - 3x 640GB - 120GB SSD - 240GB SSD

dw5304
Starter
Starter
Posts: 17
Joined: 20 Jun 2012 21:21
Status: Offline

Re: ZFS Snapshots and Replication vs RSync vs Unison

Post by dw5304 »

zfs is def just a zfs send and zfs receive.

I have already talked to dev's about adding it to the webgui... no one has yet said yes... however I do have a script that I have been running to do just this its not as many snapshots only 1 - 7 one for each day of work but it can be used to expand out more if necessary. I will post the bash script soon.

dw5304
Starter
Starter
Posts: 17
Joined: 20 Jun 2012 21:21
Status: Offline

Re: ZFS Snapshots and Replication vs RSync vs Unison

Post by dw5304 »

i ended up finding the script :)

Code: Select all

#!/bin/sh
/usr/bin/logger -p local4.notice "Start of local RSYNC from /mnt/main/ to /mnt/rsync/"
if [ -r /var/run/rsync_local_running_972d449a-eb43-4be8-ad5a-72377444e8aa ]; then
/usr/bin/logger -p local4.notice "Previous local synchronization still running... exiting"
exit
fi
/usr/bin/logger -p local4.notice "Starting zfs backup."
zfs destroy backup/data@7daysago
zfs destroy main@7daysago
zfs rename backup/data@6daysago backup/data@7daysago
zfs rename main@6daysago main@7daysago
zfs rename backup/data@5daysago backup/data@6daysago
zfs rename main@5daysago main@6daysago
zfs rename backup/data@4daysago backup/data@5daysago
zfs rename main@4daysago main@5daysago
zfs rename backup/data@3daysago backup/data@4daysago
zfs rename main@3daysago main@4daysago
zfs rename backup/data@2daysago backup/data@3daysago
zfs rename main@2daysago main@3daysago
zfs rename backup/data@yesterday backup/data@2daysago
zfs rename main@yesterday main@2daysago
zfs rename backup/data@now backup/data@yesterday
zfs rename main@now main@yesterday
zfs snapshot main@now
zfs send -i main@yesterday main@now | zfs receive backup/data
/usr/bin/touch /var/run/rsync_local_running_972d449a-eb43-4be8-ad5a-72377444e8aa
/usr/bin/logger -p local4.notice "Loading Fuse"
/sbin/kldload fuse
/bin/mkdir /mnt/rsync
/usr/bin/logger -p local4.notice "Attaching hdd to computer"
/sbin/atacontrol attach ata5
/usr/bin/logger -p local4.notice "Mounting NTFS drive"
/sbin/mount_ntfs-3g /dev/ad10s1 /mnt/rsync
/bin/sleep 5
/usr/local/bin/rsync --log-file=/var/log/rsync_local.log --recursive --times --archive --delete --perms --xattrs "/mnt/main/" "/mnt/rsync/"
/usr/bin/logger -p local4.notice "Unmounting Rsync backup drive"
/sbin/umount /mnt/rsync
/usr/bin/logger -p local4.notice "Detaching hdd from server"
/sbin/atacontrol detach ata5
/bin/rm -r -f /mnt/rsync
/bin/rm -f /var/run/rsync_local_running_972d449a-eb43-4be8-ad5a-72377444e8aa
/usr/bin/logger -p local4.notice "End of local RSYNC synchronization from /mnt/main/ to /mnt/rsync/
"

Post Reply

Return to “ZFS (only!)”