Overclock.net › Forums › Video Games › PC Gaming › [OPEN SOURCE] Automatic Steam Backup/Restore Tool
New Posts  All Forums:Forum Nav:

[OPEN SOURCE] Automatic Steam Backup/Restore Tool - Page 2

post #11 of 257
Thread Starter 
oh wow, a true batch file ninja tongue.gif

awaiting your 'fixed' version
post #12 of 257
Working on it Its just the 7z extraction is going wrong somewhere. Oh well, using 500mb of gcfs and a ramdisk ftw
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
post #13 of 257
Fixed:
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.
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
post #14 of 257
Thread Starter 
Thanks FiX +Rep, i have updated the OP

and i neatened it up a bit

EDIT: any form of GUI sound fine.. i only played with VB myself
Edited by Du-z - 3/21/11 at 1:51am
post #15 of 257
What's the difference between this and creating a WinRAR archive of the whole steamapp folder?
Just to know, nice job anyway man!
post #16 of 257
Thread Starter 
Really large archives take ages to open which is really annoying when you only want to restore a handful of games.

The only other reason is... because i can
post #17 of 257
you're awesome.

i could have used this yesterday if i'd seen it since i reformatted.

thank you so much +
Herschel
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7 4770K ASRock Z87M Extreme4 eVGA GTX 680 2GB 12GB G.Skill Ripjaws 1600 
Hard DriveOptical DriveOSMonitor
1x 60GB SSD 1x 500GB, 1x 640GB, 1x 1TB Asus something or other Windows 7 Ultimate x64 Acer H236HLbid (23" 1920x1080) 
MonitorKeyboardPowerCase
Asus VE198 (19". 1440x900) Microsoft Sidewinder X4 Seasonic X650 Antec P180 Mini White 
Mouse
Logitech G500 
  hide details  
Reply
Herschel
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7 4770K ASRock Z87M Extreme4 eVGA GTX 680 2GB 12GB G.Skill Ripjaws 1600 
Hard DriveOptical DriveOSMonitor
1x 60GB SSD 1x 500GB, 1x 640GB, 1x 1TB Asus something or other Windows 7 Ultimate x64 Acer H236HLbid (23" 1920x1080) 
MonitorKeyboardPowerCase
Asus VE198 (19". 1440x900) Microsoft Sidewinder X4 Seasonic X650 Antec P180 Mini White 
Mouse
Logitech G500 
  hide details  
Reply
post #18 of 257

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.
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
post #19 of 257
Dude that looks sweet...
Bench Stuffs
(32 items)
 
ITX Daily Driver
(11 items)
 
For Sale: 6GHz+ 980X
$225 (USD) or best offer
CPUCPUCPUCPU
Intel Core i7 920 Intel Xeon W3520 Intel Core i7 4770K Intel Core 2 Duo E8500 
CPUCPUCPUCPU
Intel Pentium G3258 Intel QX9650 AMD FX 4300 Intel E2140 
CPUMotherboardGraphicsGraphics
E4300 Asus Rampage Extreme / P5E3 Deluxe / Gigabyte X... MSI GTX 275 Lightning MSI HD 7970 Lightning 
GraphicsGraphicsGraphicsGraphics
Asus GTX 285 Matrix Platinum MSI HD 5870 Lightning EVGA GTX 980 TI Classified K|ngp|n Edition MSI GTX 580 Lightning 
RAMRAMRAMRAM
Corsair Dominator Platinum 2666 10-12-12 Samsung Corsair Dominator GT 2000 7-8-7 Hypers Kingston HyperX 2000 9-9-9 BBSE G.Skill Trident 2000 9-9-9 PSC 
Hard DriveHard DriveHard DriveCooling
Kingston SSD Now! 128GB Patriot Torqx 2 32GB Seagate 80GB XPSC Rasa + EK VGA + HWLabs Black Ice GTX 360 +... 
OSOSOSKeyboard
W7 Pro x64 SP1 Windows XP x86 SP3 W8.1 Ducky Shine 3, Cherry Brown Switches 
PowerCaseMouseMouse Pad
Corsair AX1200 Dimastech Easy V2.5! <3 Logitech G5 Battlefield 2142 Edition Puretrak Stealth 
  hide details  
Reply
Bench Stuffs
(32 items)
 
ITX Daily Driver
(11 items)
 
For Sale: 6GHz+ 980X
$225 (USD) or best offer
CPUCPUCPUCPU
Intel Core i7 920 Intel Xeon W3520 Intel Core i7 4770K Intel Core 2 Duo E8500 
CPUCPUCPUCPU
Intel Pentium G3258 Intel QX9650 AMD FX 4300 Intel E2140 
CPUMotherboardGraphicsGraphics
E4300 Asus Rampage Extreme / P5E3 Deluxe / Gigabyte X... MSI GTX 275 Lightning MSI HD 7970 Lightning 
GraphicsGraphicsGraphicsGraphics
Asus GTX 285 Matrix Platinum MSI HD 5870 Lightning EVGA GTX 980 TI Classified K|ngp|n Edition MSI GTX 580 Lightning 
RAMRAMRAMRAM
Corsair Dominator Platinum 2666 10-12-12 Samsung Corsair Dominator GT 2000 7-8-7 Hypers Kingston HyperX 2000 9-9-9 BBSE G.Skill Trident 2000 9-9-9 PSC 
Hard DriveHard DriveHard DriveCooling
Kingston SSD Now! 128GB Patriot Torqx 2 32GB Seagate 80GB XPSC Rasa + EK VGA + HWLabs Black Ice GTX 360 +... 
OSOSOSKeyboard
W7 Pro x64 SP1 Windows XP x86 SP3 W8.1 Ducky Shine 3, Cherry Brown Switches 
PowerCaseMouseMouse Pad
Corsair AX1200 Dimastech Easy V2.5! <3 Logitech G5 Battlefield 2142 Edition Puretrak Stealth 
  hide details  
Reply
post #20 of 257
Thread Starter 
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.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: PC Gaming
Overclock.net › Forums › Video Games › PC Gaming › [OPEN SOURCE] Automatic Steam Backup/Restore Tool