Can steam backup from Windows be used to restore the game in Linux?
A way to find out how much will be downloaded in 4 steps:
Install the linux version of steam as well as the windows version, and download the game in question twice.
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.
Make sure your linux pc has the programs
rsync
,sed
,perl
. The latter two are quite ubiquitious, but you may have to installrsync
depending on your distribution.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.
Mostly
I regularly install Team Fortress 2 (another Valve game) on both Linux and Windows machines (but haven't tried macOS) and use the same backup. The game installs all the data files but the executables (files made for the specific OS) and any updates that have come online since the backup was made would be downloaded which are considerably less than downloading the whole game. All in all the most I've seen being downloaded are a few hundred MiBs.
Also note that Dota 2 shares a lot with other Valve games since they are all made with Source, Valve's game engine.