Rsync or other?

sabi-tech

Dabbler
Joined
Jan 19, 2012
Messages
45
Hi all, So i have been trawling the forums and looking online for a guide to help me sync my data to another drive but i have come up stumped.
I have an HP Microserver and i am using 4x3tb WD red drives for my data in a RAIDZ1 array so i have one disk redundancy.
Currently i am using 1.8tb of space.
I have an additional 3tb wd red in a hotswap bay attatched to the microserver on the spare SATA port.

The 4x3tb drives are in a dataset called Data
The 1x3tb drive is in a dataset called Backup

I have set permissions on the Data dataset to User: guest and Group: guest
I have set permissions on the Data dataset to User: root and Group: wheel

What i would like to acheive is a monthly backup of my 'Data' dataset to my 'Backup' dataset. it should delete and then copy the files over.

I found a script that i was told to run within FreeNAS shell:
rsync -avrht --delete --stats /mnt/Data /mnt/Backup

This sadly didnt seem to work.

Can anyone help me out here?
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
In what way did the rsync command not seem to work? Errors? Missing files? No output?
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
-a is archive mode and implies options including -r (recursive) and -t (transfer modification times)
-h is help and won't do anything

Can you try again with:
rsync -Pva --delete --stats /mnt/Data /mnt/Backup
-P turns on partial transfers and progress display
-v enables extra verbose output[/icode]
 

sabi-tech

Dabbler
Joined
Jan 19, 2012
Messages
45
will try this now.
i have opened up cron task and put that script in, selected run now from the drop down menu. is there a method to check progress?
 
Last edited:

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
Not by default, I don't think so. You could run the command manually in a shell. Or you could use pipe the cron command through tee.
Code:
rsync -Pva --delete --stats /mnt/Data /mnt/Backup 2>&1 | tee -a /mnt/some-path/rsync-copy-output.txt

the 2>&1 redirects stderr to stdout so you'll get both streams of data. hopefully they don't get mixed up too much while you're viewing :smile:
then you could monitor the output with:
Code:
tail -F /mnt/some-path/rsync-copy-output.txt
 

sabi-tech

Dabbler
Joined
Jan 19, 2012
Messages
45
thats fine, it seems to be working well, so far done 1.04tb data so seems good so far! :)

By my calculations that would make average trans speeds around 600mbps?
 

sabi-tech

Dabbler
Joined
Jan 19, 2012
Messages
45
Hi yeah I had a look but it seemed to be more pointed at nas to nas rather than another pool on the same nas
 

blueether

Patron
Joined
Aug 6, 2018
Messages
259
Works well from one pool to another on the same box:
zfs send Data/@<Data_Snapshot> | zfs recv Baclup/

Read up on expiring old snapshots
 
Top