Monday, November 3, 2008

BackupPC Install Guide for Windows XP/Vista Clients

I've been working on getting BackupPC set up on my home network, and as part of that process I've kept notes of everything I had to do (twice, now). I rewrote them as the BackupPC Install Guide for Windows XP/Vista Clients available on my UMD CS site.

To backup Windows clients, I used Cygwin, rsyncd, and a pre-established SSH tunnel because of problems with regular rsync over SSH when using Windows and BackupPC.

Monday, September 29, 2008

rsyncd exclusions for using BackupPC on Vista

Edit: These exclusions have expanded/corrected and are further detailed in my BackupPC Install Guide for Windows XP/Vista Clients.

I've been working on getting BackupPC set up on my home network. To backup Windows clients, we've had to use cygwin+rsync+ssh. Because of problems with that combination on Windows, I used rsyncd instead of just rsync over ssh.

When I finally got that working, I ran into a lot of problems on my Vista machines where rsync would follow the junction points they added for backward compatability (see this site for more info). This caused extra-long filenames rsync couldn't handle. To find all junction points on your Vista machine use this command at the C: drive in the Command Prompt:
dir /a /l /s > c:\users\USERNAME\JunctionPoints.txt
So I had to add all of these to the exclude list for rsyncd. Here is my rsyncd.conf (with redacted data, of course):
gid = users
read only = true
use chroot = false
transfer logging = false
log file = /var/log/rsyncd.log
log format = %h %o %f %l %b
hosts allow = BACKUPPC_IP
hosts deny = 0.0.0.0/0
auth users = BACKUPPC_USERNAME
secrets file = /etc/rsyncd.secrets
strict modes = false
[c]
path = /cygdrive/c
exclude from = /etc/exclude-c.txt
The 'exclude from' line specifies the location of the exclude file. Below are the contents of exclude-c.txt for the junction points:
#Junction points
- /Users/All Users
- /Users/Users/Default User
- /Users/Users/All Users/Application Data
- /Users/Users/All Users/Desktop
- /Users/All Users/Documents
- /Users/All Users/Favorites
- /Users/All Users/Start Menu
- /Users/All Users/Templates
- /Users/Public/Documents/My Music
- /Users/Public/Documents/My Pictures
- /Users/Public/Documents/My Videos
#Excludes these junction points common to every user profile
- /Users/*/Application Data
- /Users/*/Cookies
- /Users/*/Local Settings
- /Users/*/My Documents
- /Users/*/NetHood
- /Users/*/PrintHood
- /Users/*/Recent
- /Users/*/SendTo
- /Users/*/Start Menu
- /Users/*/Templates
- /Users/*/AppData/Local/Application Data
- /Users/*/AppData/Local/History
- /Users/*/AppData/Local/Temporary Internet Files
- /Users/*/Documents/My Music
- /Users/*/Documents/My Pictures
- /Users/*/Documents/My Videos
The rules with asterisks in them will match the junction points that are in every user profile by default without having to code each user manually.

Then, to get rid of any temp data in the backups we use the following:
- /Users/*/AppData/Local/Microsoft/Windows/Temporary Internet Files
- /Users/*/AppData/Local/Temp
- /Users/*/NTUSER.DAT
- /Users/*/ntuser.dat.LOG1
- /Users/*/ntuser.dat.LOG2
- /Users/*/AppData/Local/Microsoft/Windows/UsrClass.dat
- /Users/*/AppData/Local/Microsoft/Windows/UsrClass.dat.LOG1
- /Users/*/AppData/Local/Microsoft/Windows/UsrClass.dat.LOG2
- /Users/*/AppData/Local/Microsoft/Windows Defender/FileTracker
- /Users/*/AppData/Local/Mozilla/Firefox/Profiles/*/Cache
- /Users/*/AppData/Roaming/Microsoft/Windows/Recent
- *.lock
Finally, any program or system installation files can be omitted. On Vista, only original installation data is stored in Program Files. Any data programs write to their installation folder goes to ProgramData automatically instead. The Windows folder shouldn't hold anything interesting, either. The rest of these rules are replaceable or unimportant data:
- /Program Files
- /Windows
- /$Recycle.Bin
- /MSOCache
- /System Volume Information
- /autoexec.bat
- /bootmgr
- /BOOTSECT.BAK
- /config.sys
- /hiberfil.sys
- /pagefile.sys
If you're only backing up the users folder, you can omit the last rules and remove the '/Users' prefix from the rest of the rules.

And viola! Finally we can get a full backup!

Sunday, September 28, 2008

NetGrok released

We've finally released our Information Visualization class project NetGrok, which is a tool for visualizing computer networks in real-time. Our paper for it was published as part of the proceedings of VizSEC 2008. Read more at the project site check out the source at Google Code.