Junction copy behaviour
Moderators: white, Hacker, petermad, Stefan2
Junction copy behaviour
I'm backing up my entire C-drive in Windows 7, and as you may know, the drive contains a ton of "junction" links in the Users folder. Now, TC recognizes these, displays them as <LNK>, and (thankfully) only deletes the link, not the target, when I press Delete. However, while copying, I noticed it doesn't copy the junctions to the new disk but instead copies all their contents, as if they were normal directories. Although I can see why you would want to do this in certain cases, I'd like an option to treat links as links and just make new links on the target disk (even if I have to supply my own "junction" tool; unsurprisingly I have one sitting around ).
(edit) I see now there is already a topic on this in Fixed Bugs, so a little elaboration may be necessary.
Windows 7, by default, has a large amount of junctions in the Users\Erik directory. They are needed for windows to operate correctly. For example, there is a junction "Start Menu" that points to "C:\Users\Erik\AppData\Roaming\Microsoft\Windows\Start Menu". It is necessary that such junctions are not turned into directories in the process of backing up data, because if I ever move the backup back to C:, programs will expect that any changes to Start Menu also affect Appdata\Roaming\etc.. The current TC junction behaviour makes this impossible, and has me stare at a Cmd box for half an hour to recreate all junctions.
Also, I have junctions from for example "Music" to my external Music hard disk. It's not my objective to back that up, since the source drive is way too large to begin with, and since it's an entirely different medium I can just unplug that, should my computer catch fire. However, it's infeasible to tell TC, 'copy everything, but not this deeply buried folder'.
In possibly related news, I noticed an entry in the Users folder called "All Users", which dir/a informs me is a <SYMLINKD>. TC's copy of it on my backup drive is a broken folder that always tells me "Access Denied" when I open/delete it, even though I have full permissions. Since I don't know what a symlinkd is, I don't know if this is related or not; if it is: my apologies.
To reproduce: free up a considerate amount of space on another drive. Have Windows 7 Ultimate and TC7.50a, run as Admin. Copy your Users folder to your empty space ([x] Copy ntfs permissions, Options>> 2. Overwrite, [x]Skip, [x] Overwrite).
Image:Steps
Partial result - I didn't wait for the entire operation to finish Doubleclicking the selected folder gives "Access denied on file!", even though I'm running as admin.
(edit) I see now there is already a topic on this in Fixed Bugs, so a little elaboration may be necessary.
Windows 7, by default, has a large amount of junctions in the Users\Erik directory. They are needed for windows to operate correctly. For example, there is a junction "Start Menu" that points to "C:\Users\Erik\AppData\Roaming\Microsoft\Windows\Start Menu". It is necessary that such junctions are not turned into directories in the process of backing up data, because if I ever move the backup back to C:, programs will expect that any changes to Start Menu also affect Appdata\Roaming\etc.. The current TC junction behaviour makes this impossible, and has me stare at a Cmd box for half an hour to recreate all junctions.
Also, I have junctions from for example "Music" to my external Music hard disk. It's not my objective to back that up, since the source drive is way too large to begin with, and since it's an entirely different medium I can just unplug that, should my computer catch fire. However, it's infeasible to tell TC, 'copy everything, but not this deeply buried folder'.
In possibly related news, I noticed an entry in the Users folder called "All Users", which dir/a informs me is a <SYMLINKD>. TC's copy of it on my backup drive is a broken folder that always tells me "Access Denied" when I open/delete it, even though I have full permissions. Since I don't know what a symlinkd is, I don't know if this is related or not; if it is: my apologies.
To reproduce: free up a considerate amount of space on another drive. Have Windows 7 Ultimate and TC7.50a, run as Admin. Copy your Users folder to your empty space ([x] Copy ntfs permissions, Options>> 2. Overwrite, [x]Skip, [x] Overwrite).
Image:Steps
Partial result - I didn't wait for the entire operation to finish Doubleclicking the selected folder gives "Access denied on file!", even though I'm running as admin.
- ghisler(Author)
- Site Admin
- Posts: 48130
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The next version will allow to skip all junctions when copying with the synchronize dirs tool. Unfortunately I cannot simply copy the junctions, because there target may not exist on the target drive, or may be copied later than the junction itself...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
When copying junctions there should be a multiple choice:
Don't copy them, attemp to redirect them to it's new destination, maybe offer the option to create unexistant folders, and backup mode (copy them with their absolute references).
I really would like an option to backup them within a ZIP/7Z file with maybe a descriptive junction list file for restoring on decompression.
In myi opinion, junctions should be treated as .LNK files by default, they make reference of another location, it doesn't matter if location exist or not, should be copied anyway.
Don't copy them, attemp to redirect them to it's new destination, maybe offer the option to create unexistant folders, and backup mode (copy them with their absolute references).
I really would like an option to backup them within a ZIP/7Z file with maybe a descriptive junction list file for restoring on decompression.
In myi opinion, junctions should be treated as .LNK files by default, they make reference of another location, it doesn't matter if location exist or not, should be copied anyway.
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
This sounds like optional behavior, so Ok.ghisler(Author) wrote:The next version will allow to skip all junctions when copying with the synchronize dirs tool.
I am using junctions as a solution for sync-ing multiple locations on my computer with a single location equivalent with the content of my USB stick, so I want this feature as it is implemented in the current TC version.
How about handling the junctions only at the end of the sync? Then it should be possible to detect if the target exists, and ask the user what to do about it (e.g. people may still want to keep links to temporary locations).ghisler(Author) wrote:may be copied later than the junction itself...
aNDreas Bolotă
The truth always carries the ambiguity of the words used to express it. (Frank Herbert, God Emperor of Dune)
The truth always carries the ambiguity of the words used to express it. (Frank Herbert, God Emperor of Dune)
- ghisler(Author)
- Site Admin
- Posts: 48130
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
It's already in TC 7.56a, see the help:This sounds like optional behavior, so Ok
SyncIgnoreJunctions=0
0: Also follow junctions (reparse points) to directories when synchronizing
1: Exclude directory junctions from synchronizing
Warning: If a directory with the same name exists on the second side, files in it seem to exist only on that side because the junction on the first side is excluded!
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com