Sunday, November 25, 2012

Main blog post thumbnail image firstImageUrl

Using BackUpPC and Rsync to Backup Macbook Pro Mountain Lion OS

My daughter got a MacBook Pro for college. She studying journalism and photography at Drake University and a Apple computer was heavily suggested for the magazine curriculum. So we dutifully went out and got a cool MacBook Pro. A big change for us since all of our machines are currently run Microsoft Windows and Ubuntu Linux.

When she came home over Thanksgiving break, I decided to set up backuppc to also back up her local files when she was at home. Using backuppc it's nicely transparent to everyone involved. For me it's one central server that backs up all of our PC's and just one place I need to manage storage (I just added a 3TB drive to the mirror array). Should be pretty simple, since it's all linux underneath.

Essentially the process was:
  1. Exchange public SSH keys between the two machines (MacBookPro and backuppc server) and enabled SSH on the MacBook. Took me almost as much time to figure how to fire up a terminal session. http://gerwick.ucsd.edu/backuppc_manual/backuppc_mac_home.html
  2. Secure SSH to not allow password logins and changed port that SSH runs under for some obscurity.
  3. Change the network name on the Macbook Pro from "Allisons-MacBook-Pro.local" to be properly passed to my network (less than 15 characters) "Allisons-Mac.local". Apparently there are some issues on OS X passing on long names to DNS servers. http://techtips.salon.com/change-apple-mac-computer-name-537.html
  4. Used ping to test connectivity from the backuppc server to her MacBook:
  5. ping Allisons-Mac.local
  6. SSH into the Macintosh from the backuppc server as the backuppc user, just to test the connection (accept the fingerprint) and make sure no password is required to login.
  7. ssh allisontrebacz@Allisons-Mac.local -p 8080
  8. Setup the new host (Allisons-Mac.local) on the backuppc server:
    1. Made the host backup method rsync.
    2. Changed the default script to backup only the /Users directory.
    3. Modified the script backuppc uses to use the new SSH port and the user name that it runs under (not sure if this is needed).
  9. Started the full backup and things seem to be working fine.
Next time she comes home from break she will get a full backup when she connects to the network.

Sunday, November 11, 2012

Avast Antivirus Blocking BackupPC Rsync connections on Windows XP

BackupPC giving error all of a sudden.
full backup started for directory cDrive (baseline backup #0)
Read EOF: Connection reset by peer
Tried again: got 0 bytes
Error connecting to rsync daemon at 192.168.0.199:873: unexpected response
Got fatal error during xfer (unexpected response)
Backup aborted (unexpected response)
Not saving this as a partial backup since it has fewer files than the prior one (got 0 and 0 files versus 0)
Turns out the problem seems to be an update of Avast antivirus has now decided to (quietly) block connections on port 873 on my Windows XP machine. If I disable antivirus protection the backup happens wonderfully. Of course then the machine isn't protected by my anti-virus.

After digging into it deeper it seems that the offending Avast tool is the "behavior shield". By going into the Behavior Shield>Expert Settings>Trusted Processes>Browse>Add and adding rsync.exe and cygrunsrv.exe. Now Avast no longer seems to silently block a process I want to happen on my local machine.

I used the instructions at: http://sourceforge.net/projects/backuppc/files/cygwin-rsyncd/2.6.8_0/ to originally set things up for using rsync on Windows XP.

This is the second time that AVAST is mucking up my internal network the previous time it was blocking putty outgoing connections: