rsync on 8.01beta4 problems

Status
Not open for further replies.

SLIMaxPower

Explorer
Joined
Aug 13, 2011
Messages
64
Hi I am running freenas 8.01BETA4 on a hpmirco.

I have 3 zfs volumes 4tb each stripe. I want to rsync one of these volumes to another as a backup. I have tried using webgui but it doesnt seem to be working, I tried ssh into the machine and tried this rsync --partial --stats --progress -r -avz -e ssh /mnt/Pool2/ /mnt/Pool3Backup/ , and got permission denied (13)

cheers
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
The only of doing this in the GUI would be to create a CRON job, the 'rsync' GUI feature is for the daemon and thus remote backup.

As for the shell rsync not working my guess is that you cannot read/write the locations.

Try to do a 'ls -l /mnt/Pool2/' and 'ls -l /mnt/Pool3Backup/' if that works try 'touch /mnt/Pool3Backup/test.txt' if that all works then the problem may be somewhere deeper on the '/mnt/Pool2/' side where your account doesn't have read access.

PS. I'd go with the CRON job option as it runs as root... ;)
 

SLIMaxPower

Explorer
Joined
Aug 13, 2011
Messages
64
it looks like /mnt/Pool2 has full permissions whereas /mnt/Pool3Backup only has drwx - and the error i saw was on that side

so its a chmod ? i need to do ?
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
Carefull you might get your FreeNAS UI (DB) out of sync if you do it from the shell, compare the permissions between the two pools in the UI, should be the same for this to work for you.
 

SLIMaxPower

Explorer
Joined
Aug 13, 2011
Messages
64
hmmm. so whats the best way to backup one volume to another daily ?
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
System -> CronJobs -> rsync command.

Or if you want an email sent on completion you could do what I did:
Code:
#!/bin/sh
SHELL=/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin

cd /mnt/storage1/scripts

echo "Subject: Shrek's Backup report for: /mnt/storage1/$2/" > ./tmp/$2_tmpmail
printf "\n" >> ./tmp/tmpmail

rsync -$1 --delete /mnt/storage1/$2/ /mnt/backup1/$2 >> ./tmp/$2_tmpmail

msmtp --file=${msmtp_config:-"/etc/local/msmtprc"} ***xx.***xx@gmail.com < ./tmp/$2_tmpmail

Save this script on one of your pools and then enter a command like this in the CronJob UI:
Code:
/mnt/storage1/scripts/backup.sh avc home
 

SLIMaxPower

Explorer
Joined
Aug 13, 2011
Messages
64
I made a cron but it doesn't look like its working.

ps -ux displays at least 3 rsyncs I have done from shell.

email isn't working either. Is this just BETA issues ?

I was having more luck FTPing and transferring via smb shares....
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
Search the forum for how to setup the email ;) and the CRON job will only run on the specified day/hour/interval.
 

SLIMaxPower

Explorer
Joined
Aug 13, 2011
Messages
64
email is tested and setup i setup cron but im not sure the task is running. how can i check progress ?
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
The easiest way to check the cron job (yes I know the UI could have an option to run now) is to schedule it to run every 5 minutes, every hour, every day, this should trigger the job while you are at your PC to check, afterwards change the schedule to what you want it to be.
 
Status
Not open for further replies.
Top