Rsync what went wrong?

Status
Not open for further replies.

Doug99

Cadet
Joined
Nov 14, 2016
Messages
9
I'm wondering what I did wrong.

I have two freenas servers A and B. I wanted to copy everything from A to B, destroy the dataset and reconfigure the drives on A, then copy everything from B back to A again.

Rsync task on A was set to push to B. Rsync module on B was set. Everything copied over perfectly from A to B.

I then unchecked the rsync task enable box on A. I switched off the rsync service on B.

I then destroyed the dataset and marked drives as new on A.

After a few minutes my directories on B we're showing as empty!!

Anyone know what why this happened?
 

Sakuru

Guru
Joined
Nov 20, 2015
Messages
527
Did you have any other scheduled tasks such as replication?
 

Doug99

Cadet
Joined
Nov 14, 2016
Messages
9
Did you have any other scheduled tasks such as replication?
No other scheduled tasks, scrub was scheduled a few days from now. Just empty folders with timestamps corresponding to when I destroyed the volume.


Sent from my iPhone using Tapatalk
 

Pitfrr

Wizard
Joined
Feb 10, 2014
Messages
1,531
Is it possible that the rsync task was not finished?

I recall something similar: while rsync was running, I could see the files/folders but couldn't access them because they were locked or empty, I don't remember).
I'm not sure how rsync works, but does it create the folders/file structure and then start to fill the files?
 

Doug99

Cadet
Joined
Nov 14, 2016
Messages
9
Is it possible that the rsync task was not finished?

I recall something similar: while rsync was running, I could see the files/folders but couldn't access them because they were locked or empty, I don't remember).
I'm not sure how rsync works, but does it create the folders/file structure and then start to fill the files?


I'm not sure. How can you tell if an rsync task is complete and the service is shut down and it's safe to make changes?


Sent from my iPhone using Tapatalk
 

Pitfrr

Wizard
Joined
Feb 10, 2014
Messages
1,531
Well I think there is a log somewhere to follow rsync's activity but I can't tell you for sure. Maybe some more experienced members could tell (I would be interested as well, I didn't dig much into it for now).

Otherwise the method I use to check if rsync is finished is not very accurate: I go in the Reporting section of the GUI and I check that the activity for the CPU, the network and the HDD is down! ;-P
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778

Scharbag

Guru
Joined
Feb 1, 2012
Messages
620
Rsync does build the structure and then fills files. Use top to show what is running. Rsync will show in the list, likely at the top as it will be using CPU.

Another way to do it is to use the shell to execute the rsync push. Something like:

Code:
rsync -avh --progress /mnt/tank/folder/ user@remote_server:/mnt/tank/folder/


That way, you can watch the progress as rsync does its job.

Cheers,
 
Status
Not open for further replies.
Top