Overclock.net banner
1 - 20 of 258 Posts

· Premium Member
Joined
·
2,645 Posts
Code:

Code:
@echo off

setlocal

REM Location of 7z.exe (Must be command line version)
:input1
echo Where is the location of the 7z.exe file? (Command Line version)
set exe=
set /P exe=Type input: %=%
if "%exe%"=="" goto input1

REM Location of Steam folder
:input2
echo Where is the location of the steam install? Leave trailing backslash! (No \ at end) (Full directory - E.G. C:\Program Files(x86)\steam)
set root=
set /P root=Type input: %=%
if "%root%"=="" goto input2

REM Location of destination folder
:input3
echo Where do you want it to be backed up to? Leave trailing backslash! (No \ at end) (Full directory - E.G. E:\steam_backup, directory must

exist already!)
set dest=
set /P dest=Type input: %=%
if "%dest%"=="" goto input3

echo location of Steam folder: %root%
echo Destination of backup files: %dest%

echo. 
echo Starting to backup 'steamapps' folder (Excluding common folder).
"%exe%" a -t7z "%dest%\steamapps.7z" "%root%\steamapps\*" -mx9 -xr!common > NUL
if exist "%dest%\steamapps.7z" echo '%dest%\steamapps.7z' has been backed up.

echo. 
echo Starting to backup games in 'common' folder (individually).
for /F "tokens=* usebackq" %%G in (`dir "%root%\steamapps\common" /A:D /B`) do (
echo. 
echo Starting to backup '%%G'.
"%exe%" a -t7z "%dest%\common\%%G.7z" "%root%\steamapps\common\%%G" -mx9 > NUL
if exist "%dest%\%%G.7z" echo '%%G' has been backed up.
)

echo. 
echo Finished backing up steamapps folder.

endlocal
pause
Made it take user input in .bat. No need for editing of file, might make a GUI if you want
smile.gif
 

· Premium Member
Joined
·
2,645 Posts
Code:

Code:
@echo off

setlocal

REM Location of 7z.exe (Must be command line version)
:input1
echo Where is the location of the 7z.exe file? (Command Line version)
set exe=
set /P exe=Type input: %=%
if "%exe%"=="" goto input1

REM Location of Steam folder
:input2
echo Where is the location of the steam install? Leave trailing backslash! (No \ at end) (Full directory - E.G. C:\Program Files(x86)\steam)
set root=
set /P root=Type input: %=%
if "%root%"=="" goto input2

REM Location of destination folder
:input3
echo Where do you want it to be backed up to? Leave trailing backslash! (No \ at end) (Full directory - E.G. E:\steam_backup, directory must

exist already!)
set dest=
set /P dest=Type input: %=%
if "%dest%"=="" goto input3

echo location of Steam folder: %root%
echo Destination of backup files: %dest%

REM Choose backup or restore
:input4
echo Backup or Restore?
echo b/r - type one!
set type
set /P type=Type input: %=%
if "%type%"=="" goto input3
if "%type%"=="b" goto backup
if "%type%"=="r" goto restore

:restore
echo. 
echo Starting to restore 'steamapps' folder.
"%exe%" x "%root%\steamapps.7z" -o"%dest%\steamapps" > NUL
echo '%dest%\steamapps' has been restored.

echo. 
echo Starting to restore games in 'common' folder.
for /F "tokens=* usebackq" %%G in (`dir "%root%\common" /B`) do (
echo. 
echo Starting to restore '%%G'.
"%exe%" x "%root%\common\%%G" -o"%dest%\steamapps\common" -ax!steamapps.7z > NUL
echo '%%G' has been restored.
)

echo. 
echo Finished restoring steamapps folder.
goto :eof

:backup
echo. 
echo Starting to backup 'steamapps' folder (Excluding common folder).
"%exe%" a -t7z "%dest%\steamapps.7z" "%root%\steamapps\*" -mx9 -xr!common > NUL
if exist "%dest%\steamapps.7z" echo '%dest%\steamapps.7z' has been backed up.

echo. 
echo Starting to backup games in 'common' folder (individually).
for /F "tokens=* usebackq" %%G in (`dir "%root%\steamapps\common" /A:D /B`) do (
echo. 
echo Starting to backup '%%G'.
"%exe%" a -t7z "%dest%\common\%%G.7z" "%root%\steamapps\common\%%G" -mx9 > NUL
if exist "%dest%\%%G.7z" echo '%%G' has been backed up.
)

echo. 
echo Finished backing up steamapps folder.
goto :eof

:eof
endlocal
pause
Joined both backup and restore together
tongue.gif

Edit: Not working fully. 1 Min
 

· Premium Member
Joined
·
2,645 Posts
Fixed:

Code:
Code:
@echo off

setlocal

REM Location of 7z.exe (Must be command line version)
:input1
echo Where is the location of the 7z.exe file? (Command Line version)
set exe=
set /P exe=Type input: %=%
if "%exe%"=="" goto input1

REM Location of Steam folder
:input2
echo Where is the location of the steam install? Leave trailing backslash! (No \\ at end) (Full directory - E.G. C:\\Program Files(x86)\\steam)
set root=
set /P root=Type input: %=%
if "%root%"=="" goto input2

REM Location of destination folder
:input3
echo Where do you want it to be backed up to? Leave trailing backslash! (No \\ at end) (Full directory - E.G. E:\\steam_backup, directory must

exist already!)
set dest=
set /P dest=Type input: %=%
if "%dest%"=="" goto input3

echo location of Steam folder: %root%
echo Destination of backup files: %dest%

REM Choose backup or restore
:input4
echo Backup or Restore?
echo b/r - type one!
set type
set /P type=Type input: %=%
if "%type%"=="" goto input3
if "%type%"=="b" goto backup
if "%type%"=="r" goto restore

:restore
echo. 
echo Starting to restore 'steamapps' folder.
"%exe%" x "%dest%\\steamapps.7z" -o"%root%\\steamapps" > NUL
echo '%dest%\\steamapps' has been restored.

echo. 
echo Starting to restore games in 'common' folder.
for /F "tokens=* usebackq" %%G in (`dir "%root%\\common" /B`) do (
echo. 
echo Starting to restore '%%G'.
"%exe%" x "%dest%\\common\\%%G" -o"%root%\\steamapps\\common" -ax!steamapps.7z > NUL
echo '%%G' has been restored.
)

echo. 
echo Finished restoring steamapps folder.
pause
goto :eof

:backup
echo. 
echo Starting to backup 'steamapps' folder (Excluding common folder).
"%exe%" a -t7z "%dest%\\steamapps.7z" "%root%\\steamapps\\*" -mx9 -xr!common > NUL
if exist "%dest%\\steamapps.7z" echo '%dest%\\steamapps.7z' has been backed up.

echo. 
echo Starting to backup games in 'common' folder (individually).
for /F "tokens=* usebackq" %%G in (`dir "%root%\\steamapps\\common" /A:D /B`) do (
echo. 
echo Starting to backup '%%G'.
"%exe%" a -t7z "%dest%\\common\\%%G.7z" "%root%\\steamapps\\common\\%%G" -mx9 > NUL
if exist "%dest%\\%%G.7z" echo '%%G' has been backed up.
)

echo. 
echo Finished backing up steamapps folder.
pause
goto :eof

:eof
endlocal
pause
Had to flip %dest% and %root%
That worked for me, just need some other to try it. I will work on the GUI tomorrow. .Net 4 and C# sound ok?
G2G now, work on it tomorrow.
 

· Premium Member
Joined
·
2,645 Posts

Got quite a bit of work done today, its multi-threaded
At the moment, it backs up the steamapps folder. Hopefully I can finish it tomorrow.
 

· Premium Member
Joined
·
2,645 Posts
Quote:
Originally Posted by Du-z;12822304
Holey Moley!

May i ask in what way is it multithreaded? (it backs up two archives at a time?)

Also does anybody know what file does steam uses to store information about whether or not certain game are installed? it would be handy to back that up to, I hate having to double click to 'download' every game.
It backs up common folder and steamapps folder at same time.
And its because your missing the icons and stuff in the regular steam folder.
 

· Premium Member
Joined
·
2,645 Posts
Quote:
Originally Posted by CravinR1;12835293
I just copy the entire folder to my backup hd and run it from there
This is for backing up. It compresses all the .GCF's and common folder into .7z (7-zip) files, which are quite a lot smaller. (Du-Z compressed ~500gb into ~350gb)
 

· Premium Member
Joined
·
2,645 Posts
Just remembered that steam install directory has to be the steamapps folder. and hosting will be sorted out when iv got a stable release
tongue.gif
 

· Premium Member
Joined
·
2,645 Posts
Was a few hours
tongue.gif
But now I've got v1.0.1 done!

Code:

Code:
Changelog:
Fixed issue for selecting steam install directory. (Select Steam, not steamapps).
Download Here
 

· Premium Member
Joined
·
2,645 Posts
The threads are basically restricted to the 7za.exe file. 7-Zip is managing threads, my app just starts 1x 7zip process for all the .GCF files, then each folder under common has its own process, but the process for common folders is done one at a time. (May fix that in next release)
 

· Premium Member
Joined
·
2,645 Posts
well, theres nothing i can do about the steamapps folder as its only 1 archive. but i can get all the common folders on different threads running concurrently
 

· Premium Member
Joined
·
2,645 Posts
Quote:


Originally Posted by Du-z
View Post

Yup thats out in a nutshell. Don't run all the threads at once though.each instance of 7zip uses ~0.5GB of ram

Wow, really? I never noticed.... Might as well leave it where it is then (1 steamapps thread, and 1 common thread for each folder, although theres only 1 common thread running at a time.)
 
1 - 20 of 258 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top