Smokes your problems, coughs fresh air.

Tag: rsync

Finding junction files in Windows 7 and exclude them with DeltaCopy

Windows 7 has a sort of hard link, a junction file, which it uses to link the old location “Documents and Settings” to /Users/. Because of all this junctioning, you can’t just copy files with a Cygwin program like Deltacopy, because it will hang in infinite loop and copy a whole lot of things twice.

To identify junction files, run:

dir /AL /s

Here is an example exclude list for deltacopy for a standard windows 7 machine. Path names are specified assuming every user dir is supplied as separate dir to copy (because there are references to root, like ‘/Mijn documenten’:

--delete-excluded --exclude "/Application Data" --exclude "**/Downloads" --exclude "**/AppData/Local/Application Data" --exclude "/Local Settings" --exclude "**/Temporary Internet Files" --exclude "**/Flash Player" --exclude "**/Temp" --exclude "**/VirtualStore" --exclude "NTUSER.DAT*" --exclude "UsrClass.dat*" --exclude "ntuser.dat*" --exclude "parent.lock" --exclude "/Mijn documenten"  --exclude "/Mijn afbeeldingen" --exclude "/Mijn muziek" --exclude "/Mijn video's"

The ‘Mijn Documenten’ and such is a link to other dirs, so it doesn’t skip them. Be sure not to use these statements when running this on Windows XP…

Setting up Rsync daemon

What can you do when you want to backup your entire machine to a remote location but only have non-root shell access? You use rsyncd.

On the server you need to configure a module in /etc/rsyncd.conf:

transfer logging=no
read only=no

Then you need to rsync using a destination like user@host::module_name/

To make it work, you first need to set up a tunnel using SSH, because the rsync port (873) is not open in the firewall, most likely. So, you do this:

ssh -N -L 873:localhost:873 user@host

I wrote a script to automate this all. Perhaps I will follow-up on this post sometime and post it.

© 2024 BigSmoke

Theme by Anders NorenUp ↑