Backing up Steam with CWRsync

This may or may not be of use to other people, and seeing as I’ve not written a blog post for ages, I thought I’d post it here. Before demolishing my PC last year and building a new one once I found myself gainfully employed once again I was working on something to back up Steam (and indeed image my PC). I never got the hang of using windows ghost copies from batch scripts to image the windows drive out but I did come up with a bash script to copy steam off to a USB or eSATA drive:



REM ** CUSTOMIZE ** Specify where to find rsync and related files (C:\CWRSYNC)
SET CWRSYNCHOME="D:\Program Files (x86)\cwRsync"

REM Set CYGWIN variable to 'nontsec'. That makes sure that permissions
REM on your windows machine are not updated as a side effect of cygwin
REM operations.
SET CYGWIN=nontsec

REM Set HOME variable to your windows home directory. That makes sure
REM that ssh command creates known_hosts in a directory you have access.

REM Make cwRsync home as a part of system PATH to find required DLLs

REM rsync
REM -r recursive
REM -v verbose
REM -P progress
REM -k transform hard link to dir on dest.
REM -L transform symlink to dir on dest.
REM -u update, probably a winblows timestamp fix to stop it copying every file every time.
sc stop MsMpSvc
taskkill /f /im msmpeng.exe
REM rsync --delete -rvuP --exclude='Google' -exclude='Temporary Internet Files' --exclude='Local Low' --exclude='Backup' --exclude='Temp' --exclude='*Cache*' /cygdrive/c/Users /cygdrive/h/
rsync -rvukPL --exclude='httpcache' --exclude='htmlcache' --exclude='overlayhtmlcache' /cygdrive/d/Games/Steam /cygdrive/g/Games/PC/
sc start MsMpSvc

Hopefully it’s of use to someone. If you’re not comfortable with the sc stops and taskkill commands then get rid of them, I just found (especially when copying the windows users directory) that it interfered and made the rsync slow to a crawl).

In other news there’s err not a lot. If there was I’d post it here. 😛

Actually that’s not true. I’ve written tonnes and tonnes of code over the last six months some of which I’d love to post but never seemed to get around to it. I’ll try and post more some. Some of things I’ve been wrestling with have been:

– Clustering Algorithms for geo location data.
– MKMapKit with transparent overlays and mad exc_bad_access errors buried deep within Map Kit/iOS. Which are mostly solved, but it still crashes occassionally even with only 1 overlay. Notably on zooming out.
– OpenGL ES, briefly last week. I’m hoping to do more fun coding in this area and have even asked my nephew to design a game. That should be amusing. 😀 It will be very very weird.
– Last.fms API, I want a basic no frills scrobbling app for the iPhone that lets me use the including It turns out it’s non trivial.

There will definitely be a post on the latter. NSNotifications from the music app are particularly interesting when your app is in the background. They go missing and there’s not hard and fast rule it would appear on how long they are kept for or under what conditions they are dropped. A rule of thumb would appear to be that you receive about 3 track change notifications and that’s it. So you can’t receive information for a whole album with the app backgrounded. Whilst tackling this supposedly obvious ‘why the hell hasn’t anyone done this already?’ app I’ve realised why the apps that are out there either:

– Don’t work.
– Use a built in player.
– Build horrible caches of your play history each time (iScrobble I’m looking at you).

Sadly the latter was particularly good when it worked but now appears to not receive updates and recent changes to iOS have rendered it useless. I can only assume because it caches it’s data in a directory that is now cleared out by the OS.

On the Chef’s Book count I’ve been wanting to sneak the time in to polish off the recipe search and update the graphics and UI. It just never seems to happen. 🙁 I’ll do it, I just don’t know when.

This entry was posted in Games, Programming and tagged , , , , , , . Bookmark the permalink.

Leave a Reply