Popular recipes tagged "meta:loc=887"http://code.activestate.com/recipes/tags/meta:loc=887/2017-04-10T13:51:58-07:00ActiveState Code Recipesdiff_copy.tcl Utility for daily differential backups of large windows directory structures (Tcl)
2017-04-10T13:51:58-07:00John Brearleyhttp://code.activestate.com/recipes/users/4184423/http://code.activestate.com/recipes/580779-diff_copytcl-utility-for-daily-differential-backup/
<p style="color: grey">
Tcl
recipe 580779
by <a href="/recipes/users/4184423/">John Brearley</a>
(<a href="/recipes/tags/backup/">backup</a>, <a href="/recipes/tags/daily/">daily</a>, <a href="/recipes/tags/tcl/">tcl</a>).
</p>
<p>When you have terrabytes of data with 100,000+ files, it is no longer practical to blindly copy the entire data structure on a daily basis. I wrote this utility diff_copy.tcl to sort out what has been changed/updated and what new files have been added and only copy the changed & new items. If the date/time of the source file is newer, the file will be copied. If the date/time of the source file is the same as the destination, the file sizes in bytes are checked to decide if a copy is necessary. If the source file is not present on the destination directory, the file is copied. There are options to remove old files from the destination directory or show what would be copied, but not actually do the copy.</p>