Misadventure with syntax: rsync in the hands of madman.

Status
Not open for further replies.

fisheater

Explorer
Joined
Jun 29, 2011
Messages
53
Misadventure with syntax: rsync in the hands of madman.

I posted this here because it doesn't really fit anywhere else, but I hope it can be a learning experience to avoid my misadventure.

The main reason I switched to FN was snapshots. I tried to do it via rsync and my DNS-323 box c the FFP but it was a bit too technical and I was a bit green with scripting. Then there are the physical limitations of the box.

My misadventure in a nutshell. I mounted my FN via NFS, ran snapshots on my RAIDz and my single ZFS HD in the tower. My goal was to rsync my desktop into a folder on my FN machine as a backup. What I did was missed a subfolder in my rsync syntax and deleted the entire contents of that folder. Opps. Enter the saving grace of snapshots. Details below.

First I mounted my FreeNAS NFS in ubuntu
192.168.1.210:/mnt/FreeNAS /mnt/FreeNAS nfs rsize=8192,wsize=8192,timeo=14,intr
192.168.1.210:/mnt/FreeNAS /mnt/FreeNAS2 nfs rsize=8192,wsize=8192,timeo=14,intr

You will notice my syntax here was incorrect. I was in fact mounting FreeNAS to both FreeNAS and FreeNAS2. This was problem number 1. I was not seeing my second HD in the FN tower, just the RAIDz in two different mnt ponits.

Then, rsync command:
rsync -av --delete --exclude ".*" /home/stonemason/ /mnt/FreeNAS/Backup/Backup/My_backup/

But ment to use:
rsync -av --delete --exclude ".*" /home/stonemason/ /mnt/FreeNAS/Backup/Backup/My_backup/Full_Personal_Backup

Oops, missed a subfolder. And all the sub-folders in this folder were deleted.

This is where problem 1 comes back into play. I looked like I had lost both collections of subfolders from both RAIDz and my 2nd HD. In fact, I was seeing my RAIDz in two mnt points. I was able to clone my snapshot and back up my files. Then I tracked my NFS mount error.

So my original reason for switching to FreeNAS was snapshot, and it worked.


Thanks to all of you for your insight and help.

Hope this helps someone else.

FE
 
Status
Not open for further replies.
Top