We use Kiln for our source control; and back it up by copying the KilnRepositories folder to another (local) drive while the services are all stopped, and then on to a network drive afterwards (the local copy is to reduce the downtime while we get a consistent copy at the same time as the DB, then the copy sent to the network is backed with the rest of our data).
We recently noticed that the drive in the server used as the temporary area is growing at a rate faster than the actual data drive, despite using
robocopy "$liveRepoLocation" "$cloneRepoLocation" /MIR /MT /W:3 /R:100 /LOG:"$backupLogLocation\BackupKiln.txt" /NFL /NDL /NP
I suspect this might be because on the source drive, there are symbolic links caused by branches of the same repository, which are just being duplicated as actual data when copied to the other drive.
If I right-click and do Properties on both folders (one on each drive), the number of files, bytes, etc., all are pretty much identical (both report 30.7GB, even though the source drive reports to only be using 25GB of the drive used).
I'd rather the script copied the symbolic links/junctions/whatever as they are; however they'd need to point to the equivalent locations on the new drive, and not back at the source drive (all links would point to somewhere inside the same tree being copied).
Ideally; I'd like to also preserve this on the network (in case we need to restore), though I suspect that might be trickier.
Does this sound like the likely cause of our issue; and can I make robocopy do what I need?