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 read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
rmcellig
Level 4
Level 4
Posts: 235
Joined: Sat May 28, 2011 11:47 am

Problem with rsync

Post by rmcellig »

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
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

Re: Problem with rsync

Post by motsteve »

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: 235
Joined: Sat May 28, 2011 11:47 am

Re: Problem with rsync

Post by rmcellig »

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
Locked

Return to “Other topics”