Steam – Can steam backup from Windows be used to restore the game in Linux

dota-2linuxsteamwindows

Pretty much what the title says, I want to run Dota 2 on my mint, my friend has updated version on his Windows. And I cannot download 18 GBs worth as I'm running it on 4G LTE Internet and it'd cost a lot. So can the backup be used to restore the game on Linux?
Thanks.

Best Answer

A way to find out how much will be downloaded in 4 steps:

  1. Install the linux version of steam as well as the windows version, and download the game in question twice.

  2. Transfer the windows copy of the game's data folder to a testing folder together with the linux version on a linux OS. It's important for this method that the two game folders exist side-by-side in the same test location.

  3. Make sure your linux pc has the programs rsync, sed, perl. The latter two are quite ubiquitious, but you may have to install rsync depending on your distribution.

  4. Run (inside a terminal, replacing the paths with your paths of choice):

Code:

> rsync -n -ai --delete /path/to/folder1  /path/to/folder2 | \ 
sed -En 's/^.{12}(.*)/\/path\/to\/\1/p' | \
perl -nle '$x += -s $_; END { print $x }'
< 7464894 

The output contains the sum total size of all files in the first folder that are not in the second folder. In the example, that would be ~7.4MB. Steam will have to download at least that much.

The code prints a list of files that are different using rsync, strips off the rsync indicator information, then feeds the list of file paths to a small perl program explained on stack overflow.