Problem with rsync

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
rmcellig
Level 4
Level 4
Posts: 224
Joined: Sat May 28, 2011 11:47 am

Problem with rsync

Postby rmcellig » Sat Oct 27, 2012 8:17 am

This is the code I am using to see if it works. If I go into Gnome Shecduled Tasks and set this to run every minute, nothing happens. If I press the run selected task button it works. I tried other time settings as well. Doesn't work.

rsync -r -t -v --progress --delete -s /media/Radiorecordings/Poland 2006 pictures /home/randy/Desktop/test3

If I try this code, it works fine. Is it because I am trying to sync from my external USB drive to a folder in my Desktop folder Home directory?

rsync -r -t -v --progress --delete -s /home/randy/Desktop/test1/ /home/randy/Desktop/test2
Attachments
rsync.png
This is how I have it set up in Gnome Scheduled Tasks which I like using.
rsync.png (30.21 KiB) Viewed 578 times
Take care,

Randy
www.mcran.com - my web site
www.chuo.fm - My radio show every Sunday from noon-2pm or 89.1 fM

motsteve
Level 1
Level 1
Posts: 31
Joined: Sat Mar 20, 2010 12:07 pm

Re: Problem with rsync

Postby motsteve » Mon Nov 05, 2012 6:50 am

If I try this code, it works fine. Is it because I am trying to sync from my external USB drive to a folder in my Desktop folder Home directory?

rsync -r -t -v --progress --delete -s /home/randy/Desktop/test1/ /home/randy/Desktop/test2


In the above, the / right behind test1 is EXTREMELY important in rsync. It means that you are syncing the contents of test1 into the established directory test2. Once you have your directory on /home/randy/Desktop/test2 created you want to update its contents with the contents of test1. If you leave off the / after test1, rsync will try first to create a directory called test2 and then fill in the contents. If you already have a test2 directory, then you have problems. I hope this helps and BTW, this is a mistake I've made a dozen times even knowing better. :oops: The command without the / in the souce directory is good if you are syncing to a target that doesn't have the subdirectory established. It's a one time deal. There's no need to worry about your media.

rmcellig
Level 4
Level 4
Posts: 224
Joined: Sat May 28, 2011 11:47 am

Re: Problem with rsync

Postby rmcellig » Mon Nov 05, 2012 7:37 am

Thanks I will make sure I have the /at the end of the source. This seems so simple so I should be able to create my sync code so that it works for me the way I want it to. I will post back with results. Thanks again!!!
Take care,

Randy
www.mcran.com - my web site
www.chuo.fm - My radio show every Sunday from noon-2pm or 89.1 fM


Return to “Other topics”

Who is online

Users browsing this forum: No registered users and 0 guests