Rsync keeps the absolute path of the source location (Solved)

Backup and data protection discussion at its finest.

Moderator: Lillian.W@AST

Post Reply
MrZap
Posts: 4
youtube meble na wymiar Warszawa
Joined: Fri Apr 09, 2021 5:03 am

Rsync keeps the absolute path of the source location (Solved)

Post by MrZap »

I'm using Remote Sync in "Backup & Restore" to migrate from an ancient Infrant ReadyNAS to my new AS5304T. While making the move, I want to do some folder restructuring. However the rsync App is adding the absolute path of the source path to the target path.

What I want:

Code: Select all

From     \\SERV01/Shared/Photos/Folder1, Folder2, etc
To       \\SERV02/Photos/Folder1, Folder2, etc

Source selected: \\SERV01/Shared/Photos
Target selected: \\SERV02/Photos


What I get:

Code: Select all

To       \\SERV02/Photos/Shared/Photos/Folder1, Folder2,
Is there a way I can easily get the sync to happen the way I want without diving into the command line?
Last edited by MrZap on Sat Apr 10, 2021 3:41 am, edited 1 time in total.
User avatar
orion
Posts: 3482
Joined: Wed May 29, 2013 11:09 am

Re: Rsync keeps the absolute path of the source location

Post by orion »

I guess you enable "Use 1 on 1 folder sync". You should simple un-check this option.
If it's not the case, post the pictures that you did (every step).
MrZap
Posts: 4
Joined: Fri Apr 09, 2021 5:03 am

Re: Rsync keeps the absolute path of the source location

Post by MrZap »

My sync did not have "Use 1 on 1 folder synchronization" checked off. Looking at the documentation, it is not entirely clear what this option does. Can anyone provide a little better description to help me understand what this option does? "1 on 1" is not a term used in any other rsync documentation that I could find.

At this point I will complete the sync (a few more hours) as is. Once done, I will move the files to get rid of the intermediate unwanted levels in the path. After that I can do some testing on smaller folders and if I cannot get what I want using the "1 on 1" option, I will post a full list of my settings.

Thanks for the suggestion.
User avatar
orion
Posts: 3482
Joined: Wed May 29, 2013 11:09 am

Re: Rsync keeps the absolute path of the source location

Post by orion »

MrZap wrote:Looking at the documentation, it is not entirely clear what this option does. Can anyone provide a little better description to help me understand what this option does? "1 on 1" is not a term used in any other rsync documentation that I could find.
I don't know neither. I just do try-and-error test for this setting. When set it on, I see the contents with full path. Not sure if there are other features / functions about this setting.
MrZap
Posts: 4
Joined: Fri Apr 09, 2021 5:03 am

Re: Rsync keeps the absolute path of the source location

Post by MrZap »

"Use 1 on 1 folder synchronization" did the trick.

For those who are wondering:
When using Asustor Backup and Restore - Remote Sync, "Use 1 on 1 folder synchronization" allows you to select only one source folder and a destination folder. The contents of the source folder including any subfolders will be sync'd to the destination folder with no additional path changes.

If "Use 1 on 1 folder synchronization" is not selected, you can select one or more source folders or files and the final destination path will be the destination path specified plus the source path. So lets say we selected the following folders as sources and destination:

Code: Select all

Source folders selected:
 \\SERV01/Shared/Photos/SubfoderA/SubfolderB/SubfolderC1
 \\SERV01/Shared/Photos/SubfoderA/SubfolderB/SubfolderC2
Destination selected: 
 \\SERV02/AnotherFolder
Results in the new files (and any subfolders) placed at:

Code: Select all

\\SERV02/AnotherFolder/Shared/Photos/SubfoderA/SubfolderB/SubfolderC1
\\SERV02/AnotherFolder/Shared/Photos/SubfoderA/SubfolderB/SubfolderC2
Two other noteworthy items:
  • -Once the sync job is setup, you cannot change the "Use 1 on 1 folder synchronization" setting by editing the job.
    -If there are existing files on the destination that you want to keep, you must check off "Keep extra files at the destination". This may seem obvious but your intention is to merge several folders, you need to check this or you will lose your existing stuff.
Post Reply

Return to “Backup and Data Protection”