With TF2 recently becoming Free2Play and the huge amount of updates Valve keep shovelling down our throats, it has become common to see someone’s game files corrupted.
To combat this there is of course Steam’s backup feature which puts your GCF’s (not sure what else) into a neat little archive waiting to be awoken from its slumber… Some of you right now may be cringing at the thought of using Steam’s backup feature. I, for one, refuse to ever touch it due to bad experiences of losing 30GB of data which has to be redownloaded using a 384k internet connection.
This year alone I have had to redownload Portal 2 once and Team Fortress 2 twice. This morning would have made that 3 times but luckily a friend of mine reminded me that I had a copy of my TF2 files on my Linux partition. Although these files were old, it was much better than downloading the whole game from scratch.
At first I made myself a batch file to backup my own files which took only 4 lines but then I decided to redo it so I could distribute it and allow people to easily modify it to backup their files to where ever they want. With out wasting too much time let me get down to business.
To download the file you can head on over here and click “Download TF2backup.bat”
Before you can run it for the first time you have to edit it and tell it where everything is and where the backup must go. I did this because not everyone installs Steam in the same place and not everyone runs a 64bit system (two “Program Files” folders). I tried to explain inside the file as best I could what is required of you. At first you need to specify where the ‘main backup’ folder must be. I wanted the backup structure to allow people to modify this script to work for other games and back everything up in one main folder. Don’t try and do that if you don’t know what you’re doing. Second, you have to tell the script what the name of the folder must be that holds your “team fortress 2” files and thirdly what the name of the folder must be that holds your precious game cache files (gcf’s).
The output you will see after the backup is complete!
Note: If you want to backup to a networked drive or an external hard drive/flash drive, the very first variable will allow this. Just put in the drive letter as well as the path to where the backup folder must be. For example: “Z:\My Backups\Steam\”.
A little further down you will be asked to show the script where your Steam files reside. You need to show it where your “steamapps” folder is and then you need to tell it what your Steam ID is. Why it asks for your Steam ID is because Steam makes a folder by the same name which holds your “team fortress 2” folder. The rest of the file below the “Backing up files” section must remain untouched except for the very last line.
If you wish to have the script close its command prompt window at the end of its backup then change the very last word “pause” to “exit”. I made it pause so that it asks for you to press a button to continue. I am very paranoid when it comes to these things and I’m sure many of you using this will be too so I like to see what is happening. You can use Windows “Task Scheduler” to automatically run this script, lets say, every sunday night at 11pm when you SHOULD be fast asleep. If you leave the script on “pause” then when you wake up you will know it ran during the night, if you changed it to “exit” then it will run and you will be none the wiser – bliss!
If you suspect there has been an error during the backup, there are two log files created called “gcf_log.txt” and “tf2_log.txt”. The former will show if there were errors copying your GCF’s and the latter will show any errors copying your “team fortress 2” folder. Both of these log files will be in your backup folder inside the “TF2” folder. Don’t worry if it seems like it has hung because it most probably hasn’t. It took me about 6 minutes on my Quad-Core to backup 7GB of data.
Restoring your files will be as easy as copying the backed up files over your corrupted files. You will be backing up ALL your TF2 files so if you accidentally delete your many config files, they are all in your backup! Criticism is welcome but please understand this is pretty much only the second batch file I have ever made in my life of any use so I know there will be flaws. If you have any questions/suggestions then post them in the comments below.
Happy rocket jumping,