Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-19-2016, 02:38 PM   #1
Senior Member
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,032

Rep: Reputation: 76
rsync creates the unnecessary subfolders


I'm trying to run an incremental backup solution with rsync as follows, at fist just for testing purposes:

rsync -avzhPR --delete --stats --link-dest=/home/quas/bak2/`cat /home/quas/time2.txt` /home/quas/bak1/ /home/quas/bak2/`date +%Y-%m-%d_%H%M`/

The problem is that each time I do that, rsync automatically creates /home/quas/bak2/date/home/quas/bak1, instead of simply /home/quas/bak2/date and then the files found in bak1.

Any idea why it should do that?

(this is the site I took after, partially: from
Old 04-19-2016, 02:59 PM   #2
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 216

Rep: Reputation: 29
Drop the -R. Read the man page of rsync and it tells you that -R uses relative path names which is what you say you don't want
Old 04-19-2016, 03:14 PM   #3
Senior Member
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,032

Original Poster
Rep: Reputation: 76
Yes, I've already done it and indeed, it works as expected. I didn't understand what it meant to say exactly by relative paths here (in the tutorial it simply says that it was going to create the necessary folders - but that's what rsync does anyway if you have subfolders, etc.). Anyway, it's working now. Thanks.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Rsync and subfolders option ASTRAPI Linux - Newbie 2 11-18-2014 07:22 AM
[Unnecessary] endhx Programming 5 07-22-2014 12:32 AM
[SOLVED] RSYNC Creates New Folder Every Time (on remote server). cryingthug Linux - Server 1 09-09-2010 06:48 AM
LXer: Piracy creates jobs, FOSS creates opportunities LXer Syndicated Linux News 0 11-02-2006 11:33 AM
Which services are unnecessary? revenant Linux - Security 4 03-28-2004 11:43 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:11 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration