Jump to content

Powershell - Aid synchronisation between source and backup


ginjaninja

Recommended Posts

ginjaninja

Finds and corrects file location inconsistencies between a source and its copy.

This tool was created to efficiently keep a copy in sync, when bandwidth between the source and destination is low; and where files in source had been moved but not changed. Eg after re-naming specials.

Tools like Robocopy and Beyond Compare would copy the entire file again. Consider using this function prior to Robocopy, to ensure those files which exist in the destination are moved rather than copied again.

image.png.b70185a210bbf03162535b567c026e6f.png

 

Installation

requires Powershell 7+

import-module .\SyncRoot.psm1 -force -verbose

Help

get-help sync-root -full

get-help sync-root -examples

Usage

sync-root 'K:\TV07\ShowName','\\172.25.122.69\tv 3$\TV\TV07\ShowName' -confirm <-start here

sync-root 'K:\TV07','\\172.25.122.69\tv 3$\TV\TV07' -whatif <-or here

sync-root 'K:\TV07','\\172.25.122.69\tv 3$\TV\TV07'

sync-root 'K:\TV07','\\172.25.122.69\tv 3$\TV\TV07' -depth 1

Notes

Test thoroughly on your own filesystems, use -confirm to begin with, to move one file at a time.

Tested on Windows, local drives and UNCs

issues and suggestions welcome

Download

SyncRoot v0.0.0.1.zip

 

Edited by ginjaninja
  • Like 1
Link to comment
Share on other sites

rbjtech

Nice !  Could have done with this prior to renaming (and thus recopying..) all my backup 4K Remux's .. 👍

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...