Rsync backup

Hi

I am very new to my cloud, I have it all working and set up however i wanted to back up only certain folders not all.

I found a instruction on how to use rsync -  http://community.wd.com/t5/WD-My-Cloud/Backing-up-select-shares/td-p/877389

i created the below script and it did not work

rsync -a /shares/****/ /var/media/usbdrive/****

rsync -a /shares/****/ /var/media/usbdrive/****

rsync -a /shares/****/ /var/media/usbdrive/****

do i need to make my usb drive public access as i curently have it as private.

I make the script run via -

chmod +x  /shares/utilities/backup.sh

Now schedule a backup job, say for 0100 daily:

crontab -e {enter}

add a line at the end of the file

00 01 * * * /shares/utilities/backup.sh

(You cannot use the numeric keypad for this btw, you may wish to copy and paste to make sure of getting the spaces right))

Ctrl-X and follow your onscreen instructions

Hello,

I have never tried this. But there are some very experienced users on this community that might have some ideas about this topic. Lets see if any of them can comment about it.

Rsync on this drive is very simple. That looks too convuluted.  Do you have rsync daemon running on your server side that you are trying to sync to?

I have explained how to setup rsync on WD my cloud drive in several threads in the past. Do a search and you will find it,

alirz1 wrote:

Rsync on this drive is very simple. That looks too convuluted.  Do you have rsync daemon running on your server side that you are trying to sync to?

 

I have explained how to setup rsync on WD my cloud drive in several threads in the past. Do a search and you will find it,

Thanks for your quick reply.

I am trying to back up my shares to my usb drive that i have plugged in.

I dont think i have rsync daemon running on my wd mycloud as i have not asked it to run.

Sorry to ask this question how to i make it run on the my cloud?

thanks

James

I have run the script and it works to a point. I get error code 11 saying my destination is not there.

Do i need to mount the usb drive?

I see a bit of cut and paste from a previous posting by myself on here, glad somebody’s making use of it.

Probably your permissions are not quite right, the backup folders on your USB drive need to be created by the ‘root’ user either via PuTTY or Win SCP.

You also need a backslash (/) at the end of your backup folder name - I.e. at the end of each line commencing ‘rsync’

Nick

1 Like

I have got the backup.sh working now if i do a manual run of it, However the auto will not work. Is it because in the contab file be for my line there is a #

Does the # need removing

Yes, the hash character is an instruction to ignore the line, remove that and you’re good to go!

Cheers

Nick

1 Like

nicktee55 wrote:

Yes, the hash character is an instruction to ignore the line, remove that and you’re good to go!

Cheers

Nick

Thanks i will change that went i get back home tonight.

Should the line have a space at the front of the first character or not?

No, it should start with 00  :smiley:

BTW There’s a more detailed explanation of my system of rsync backup at

Alternative to Safepoint

1 Like