Hi,
I have a very large filesystem I want to transfer, a lot of files, most of them several gigabytes, and it's a slow process.
This filesystem is currently being written to live, and I want to start using the new drive array for writes ASAP. Only new files are being created, existing files are not being modified.
So my plan was to (during downtime) change the drive letter of the new array and put the old one on a new drive letter. Then use a PowerShell script (https://superuser.com/questions/1562774/copy-files-as-symlinks-and-maintain-the-directory-structure-on-windows) to symlink all existing files in the new array to the old array. Then I can bring it back up, the data will still be accessible and new files will be saved on the new array.
I wanted to then use FreeFileSync to update the actual data from the old array to the new array.
So I did a small test with FFS. I was hoping it would replace each symlink with the file as it progressed, but it doesn't, it creates the Temp file and then errors because it cannot rename it to what it should be due to the symlink existing.
Perhaps there is a way to have FFS replace symlinks with actual files, maybe delete them just before the rename. Or perhaps it could sync the files with a prepended string to the original filename, maybe a "Sync-"
Then I can write a PowerShell script which goes through the new array and deletes each symlink and renames the file to remove the prepend.
Is this possible with FFS, please?
TIA
Overwrite existing Symbolic Links
- Posts: 3
- Joined: 18 May 2023
- Posts: 3
- Joined: 18 May 2023
I found a fairly simple solution....
Use the PowerShell script to create symlinks from OLD:\ to NEW:\ and change the drive letter (during downtime)
Then use FSS to update OLD:\ to NEW:\Sync\ which will take several days.
then when FFS is done, during downtime I can move (Cut/Paste) the folders in Explorer from NEW:\Sync\ to NEW:\ and choose 'Replace All', it moves them very quickly and overwrites the symlinks.
Use the PowerShell script to create symlinks from OLD:\ to NEW:\ and change the drive letter (during downtime)
Then use FSS to update OLD:\ to NEW:\Sync\ which will take several days.
then when FFS is done, during downtime I can move (Cut/Paste) the folders in Explorer from NEW:\Sync\ to NEW:\ and choose 'Replace All', it moves them very quickly and overwrites the symlinks.
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
You also could have deleted the symlinks manually in FreeFileSync first, after sorting all items by "size".