[TOOL] SimpleMedianBackup v1.1.1 - saves/etc. backup tool for Windows users

Discuss Median XL!
User avatar
Esbee
Cultist
22 | 19
Common Popularity Badge
Has a thread with over 10.000 views
Seikun wrote:Having auto-backups is nice, but it doesn't solve problem of loot disappearing.


Completely agreed! Though this is a tool I would have released regardless as being in control of your save backups is an important and too often overlooked aspect of gaming/etc. (granted it's mostly because of the pain it is to manually do it). I make my own variation of this script (albeit way simpler.. just a line or two of code) for *every* game I play and have the locations tied to my personal cloud storage systems. I've spent too much time crying over lost saves due to HDD failures, corruptions, accidental deletions/changes, broken Steam cloud backups, etc. to not have learned my lesson and taken personal charge over my own files and would encourage others to do the same.
User avatar
prawn
Invader
9 | 1
Esbee wrote:If you (or anyone) can test a "real" TCP/IP game that would help clarify it.


My cop op friend is away till this weekend so we will test it then and let you know if no one else has tried it by then.

Thanks for sharing :D
Obob912
Invader
8 | 1
Thanks for this.

Warning: do NOT place in your saves folder. Otherwise the program will make backups of your backups, and disk usage will increase exponentially.
Kirussen
Invader
9 | 0
Starting the tool from a .cmd file after the median XL launcher like this: start "" "D:\Backups\Saves\Median XL\SimpleMedianBackup\SimpleMedianBackup.bat" tells me:[ERROR] No version of 7-Zip was found.. Opening it from it's location works as normally. Do you think that there's a way for it to work normally trough the .cmd file? Also, it made backups when I launched it when the game wasn't opened but the launcher was. I opened it 4 times from its location and got 4 backups. Is that supposed to happen?
User avatar
Esbee
Cultist
22 | 19
Common Popularity Badge
Has a thread with over 10.000 views
Obob912 wrote:Warning: do NOT place in your saves folder. Otherwise the program will make backups of your backups, and disk usage will increase exponentially.


Good tip, and not a use-case I had considered! The new patch (coming shortly, probably today) will fix this as it is going to come with new options to filter file types to include in the backups (characters, stashes, maps, and/or misc). I'll make sure that if everything is chosen to be backed up, which is what it currently does, it does *not* grab stuff like subfolders, .7z files, .bat files, etc.

Kirussen wrote:Starting the tool from a .cmd file after the median XL launcher like this: start "" "D:\Backups\Saves\Median XL\SimpleMedianBackup\SimpleMedianBackup.bat" tells me:[ERROR] No version of 7-Zip was found.. Opening it from it's location works as normally. Do you think that there's a way for it to work normally trough the .cmd file? Also, it made backups when I launched it when the game wasn't opened but the launcher was. I opened it 4 times from its location and got 4 backups. Is that supposed to happen?


Doing it that way means the config tool and backups will be generated wherever your command prompt is running from, which means the script won't actually load the config file as it should because it's in a totally different directory and isn't being populated by your manual changes. By default that is usually the C:\Users\YOURUSERNAME\ directory, which is probably not what you're wanting. If you want to use command prompt to run the script I'd suggest creating a shortcut to the .bat, and then calling the shortcut. That way it will properly run the script in the environment it is supposed to.

Example:
Right click the .bat, create shortcut. Rename it to whatever you want. Then in command prompt you can use:
start "" "WhateverYouNamedYourShortcut.lnk"

OR cd to the location of the script before running your command. Command prompt cares a lot about the location it is currently at.

The "opened it 4 times and got 4 backups": yes. The initial launch of the tool is supposed to immediately backup the saves, regardless of whether the game is running. It's specifically the automatic backup system that requires the game to be running.
Edited by Esbee 3 years.
Kirussen
Invader
9 | 0
Thank you! It's working now.
User avatar
Esbee
Cultist
22 | 19
Common Popularity Badge
Has a thread with over 10.000 views
Kirussen wrote:Thank you! It's working now.

Whoops you posted while I was editing. If you don't want the shortcut solution you could also just cd to the location of the script before running your command. Command prompt cares a lot about the location it is currently at, a fact I forget about far too often.
Kirussen
Invader
9 | 0
Esbee wrote:
Kirussen wrote:Thank you! It's working now.

Whoops you posted while I was editing. If you don't want the shortcut solution you could also just cd to the location of the script before running your command. Command prompt cares a lot about the location it is currently at, a fact I forget about far too often.


Could you give an example please, I don't know how to do it. I have to say, you fixed with the shortcut my problem with D2Stats who couldn't find the DropFilter.dll in it's folder.
User avatar
Esbee
Cultist
22 | 19
Common Popularity Badge
Has a thread with over 10.000 views
Kirussen wrote:
Esbee wrote:
Kirussen wrote:Thank you! It's working now.

Whoops you posted while I was editing. If you don't want the shortcut solution you could also just cd to the location of the script before running your command. Command prompt cares a lot about the location it is currently at, a fact I forget about far too often.


Could you give an example please, I don't know how to do it. I have to say, you fixed with the shortcut my problem with D2Stats who couldn't find the DropFilter.dll in it's folder.


In your specific case (at least from info in your previous response) it would be:
cd D:\Backups\Saves\Median XL\SimpleMedianBackup
start "" "SimpleMedianBackup.bat"


The idea is that you change directories within command prompt so that if you did a "dir" command you would see the script you're planning to run. *Then* you run the script truly from its actual location. Command prompt is fickle about all that and can cause very odd behavior when scripts expect things to be relative to their location, rather than absolute filepaths. That's one of the reasons why some devs prefer to use installers that add registry entries to tell your PC exactly where the files are.

All that said, if the shortcut method works then there's no real reason to go with this. Both will function the same way in the end, this is just an alternative way :)
Kirussen
Invader
9 | 0
Esbee wrote:
Kirussen wrote:
Esbee wrote:
Kirussen wrote:Thank you! It's working now.

Whoops you posted while I was editing. If you don't want the shortcut solution you could also just cd to the location of the script before running your command. Command prompt cares a lot about the location it is currently at, a fact I forget about far too often.


Could you give an example please, I don't know how to do it. I have to say, you fixed with the shortcut my problem with D2Stats who couldn't find the DropFilter.dll in it's folder.


In your specific case (at least from info in your previous response) it would be:
cd D:\Backups\Saves\Median XL\SimpleMedianBackup
start "" "SimpleMedianBackup.bat"


The idea is that you change directories within command prompt so that if you did a "dir" command you would see the script you're planning to run. *Then* you run the script truly from its actual location. Command prompt is fickle about all that and can cause very odd behavior when scripts expect things to be relative to their location, rather than absolute filepaths. That's one of the reasons why some devs prefer to use installers that add registry entries to tell your PC exactly where the files are.

All that said, if the shortcut method works then there's no real reason to go with this. Both will function the same way in the end, this is just an alternative way :)


I prefer the second method because it would look cleaner than having those shortcuts. Thank you for taking the time to help me.