Jump to content

[1.10.0] S.A.V.E - automatic backup system - 1.10.0-3173


Nereid

Recommended Posts

Problem may be a concurrent access. It cant backup training and scenarios, too. I will have to check this for regular games. But the ships folder was easy to copy/replace before 0.90, so I doubt there is a real problem.

EDIT: can't reproduce. Anybody else with this problem?

Unfortunately the KSP.log won't help much, because the backups are done in a background thread. Ingame the thread is synced with the save-event (to avoid concurrency issues; the thread is mainly used for backups in the main menu). But all log outputs in this thread will not make it in the log.

Edited by Nereid
Link to comment
Share on other sites

Nereid, this looks absolutely awesome. Having a backup is great :) Could you make the number of backups (and days to keep) a toggleable option though? Personally, harddrive space is not an issue, and I'd rather have backups that go back for months.

Link to comment
Share on other sites

bug: I can't hide the Window, therefore blocking out some buttons

What exactly happpens? The window doesn't disappear when you start a game or the "expanded" window won't minimize if you press hide? Rememebr: The window will not disappear completely in the main menu. It will alway stay in the top right corner. "hide" just minimizes it. But the window should automatically disappear ingame.

EDIT: Which plattform?

EDIT2: try 0.9.13-333. It has an additional check and hides itself without relying on events, if the status is HIDDEN (by clicking "hide") and KSP is not in the main menu.

- - - Updated - - -

Setting this up with the default backup path, "recurse subfolders", interval of "once in 2 hours", "days to keep" of 14, min of zero, max of 100 -- and the status tab always reads "failed".

(Defaults of "min 10" and "max 50" might be good.)

It's the "recurse subfolders" option that is causing the status tab to read "failed". Which also causes the backup not to be listed on the "restore" tab.

Strange. I can't reproduce this with my current build. And I didn't changed much since the last release. I have just excluded "training" and "scenarios" from the status list (and all backups), because they are "build-in". But anyway. I will release a new build just to be sure.

EDIT: try release 0.9.12-332 please and report if the backups still fail.

- - - Updated - - -

Nereid, this looks absolutely awesome. Having a backup is great :) Could you make the number of backups (and days to keep) a toggleable option though? Personally, harddrive space is not an issue, and I'd rather have backups that go back for months.

If you set the number of maximal backups and the days to keep them both to 0, it will do exactly this. :)

Edited by Nereid
Link to comment
Share on other sites

This would have definetly saved the two save games that got hit by the Hell Kraken and screwed up.

Edit: Does it work with the autosaves (which are every hour I think) or does it only work with manual saves?

Well, it should work with autosaves. But it would only backup a game BEFORE a ingame save is taking place (and they are at least done each time you switch from the space center to a vessel). If you play 4 hours without saving (not even doing a quicksave) it won't backup anything. It's not an autosave; it's an autobackup. ;)

But time is running out for me those days. So I may have overlooked some glitches (and unfortunately I'm the the only beta tester for my own plugins ;)).

I have written this to prevent data loss with Final Frontier and to deliver a more generic solution for a backup I wanted to use for myself. I have lost some games myself because of corrupted saves. KSP may be more stable in 0.90 but now we have a lot of mods that may introduce new problems. And often you realize those problems hours or days later ("what in the hell has happened to my moonbase!!?!" ;))

- - - Updated - - -

Care to spell out the Acronym?

Well... yes. "S" is the first letter in "save". "A" is the second letter in "save". "V" is the third letter in "save". And surprisingly "E" is the fourth letter in "save".

Edited by Nereid
Link to comment
Share on other sites

Nereid. Can I request a cusromised number? For all the odd people out there who like ti back up every (eg.43 mins.) Sometimes people are really odd...

Yes. But keep in mind that S.A.V.E will not do a backup after exactly 43 minutes have passed. It will do it on the next save. But not before the timer (43 minutes in your example) is expired.

The time constraints are only in place to prevent to many backups. Their purpose is not to create a backup in a given interval (this is not very useful in KSP, because the backups could be identical). If you select "each save" there will be many of them. Because a quicksave is in fact a double save (quicksave file and persistant file) it will create two backups (if they are not in the same second). And if you quicksave often, you will get many backups...

Link to comment
Share on other sites

Nereid. Can I request a cusromised number? For all the odd people out there who like ti back up every (eg.43 mins.) Sometimes people are really odd...

Feature is implemented in 0.9.14-335

It does trigger on the autosave though, right? Which is every hour I think.

I have not tested this yet. But it should trigger on any save.

Link to comment
Share on other sites

For some reason the system can only backup one of my saves, instead of all 3, it said FAILED in the status window, I've attached some screen caps id it can help identifying the problem.

http://holland.pk/uptow/i4/7fe4758f33681c724a550cdc0c5cf81c.png

http://holland.pk/uptow/i4/7fe4758f33681c724a550cdc0c5cf81c.png

EDIT: same problem as #25, unticking recurse subfolders solved the the problem. backup is created, just unable to be restored

PS. can any one explain to me what recurse subfolders mean?

Edited by AkCzx
Link to comment
Share on other sites

For some reason the system can only backup one of my saves, instead of all 3, it said FAILED in the status window, I've attached some screen caps id it can help identifying the problem

EDIT: same problem as #25, unticking recurse subfolders solved the the problem. backup is created, just unable to be restored

PS. can any one explain to me what recurse subfolders mean?

Recurse subfolder will backup all subfolders of your save game, i.e. your ships templates for the VAB and SPH (or any other subfolder created by another plugin). I have no clue why it won't work for some. Maybe KSP will write to that folder asynchronously while backups are done. For an analysis I have to change a bit, because the logging calls won't work in background threads and backups are threaded.

Unsuccessful backups are not deleted instantly, but not shown in the restore list. You can copy them manually to restore them or add the missing "backup.ok" file yourself.

Link to comment
Share on other sites

Could you add an option to save every time you load a game?

Yes. But want do you want to achieve with this?

And keep in mind: KSP loads a game every time you switch the scene. So there will be a lot of backups...

Link to comment
Share on other sites

Yes. But want do you want to achieve with this?

And keep in mind: KSP loads a game every time you switch the scene. So there will be a lot of backups...

Ah. Ok, let me be more clear :-)

When I load a game from the main menu.

or, alternatively:

Do a save when the game initially loads, and then follow the other options.

I was also hoping to use a mix of the options. For example:

Each save AND once per hour.

For now, I use (in addition to S.A.V.E) Crashplan, and when necessary, I restore from the cloud. But it's a pain to do that.

Thanks

Link to comment
Share on other sites

Recurse subfolder will backup all subfolders of your save game, i.e. your ships templates for the VAB and SPH (or any other subfolder created by another plugin). I have no clue why it won't work for some. Maybe KSP will write to that folder asynchronously while backups are done. For an analysis I have to change a bit, because the logging calls won't work in background threads and backups are threaded.

Unsuccessful backups are not deleted instantly, but not shown in the restore list. You can copy them manually to restore them or add the missing "backup.ok" file yourself.

I ran into that same problem and after unchecking the recursive save tab, it was able to restore from a new backup, well, I didn't actually restore the backup, the newest one is simply there.

Link to comment
Share on other sites

S.A.V.E

automatic backup system

current version: 0.9.12-332

Have you experienced some kind of major bug in a plugin? Did your save game got corrupt or have you lost all your ribbons in FinalFrontier, because of a single stupid mistake the developer (who is me unfortunately) has made? No? Well, you are lucky then. If you have experienced this, S.A.V.E may come to rescue. This plugin will handle automatic backups of your save games for you to prevent loss of data.

As most other software, this software comes with no warranty of any kind. If you use it, you do it at your own risk. ;)

All releases until 0.9.11-319 will not backup your ship templates!

And a word of warning: I have tested this on Windows only. I do not know, if S.A.V.E works correctly on a MAC or on Linux.


Importtant! Please read!

This plugin will store the backups at the location on the file system that is set by the user! It may write on any location on the file system if the user changes the default location. Please keep this in mind, if you are setting S.A.V.E to a different backup location.

The default location for backups is: <KSP-HOME>/backup. There is a subfolder for each save game. Each backup is stored in a folder YYYYMMDD-HHMISS.


Download: Kerbalstuff

license: GPLv3


Features:

  • Completely automatic; it will create a backup after a save
  • Backups can be stored anywhere in the file system ("a king who must say 'I'm the king' is no real king" ;) -a backup on the same hard disk is no real backup)
  • Configurable backup interval
  • Configurable minimal number of successful backups
  • Configurable maximal number of backups
  • Configurable time in days to keep backups
  • Backup of all games at once
  • Restore functionality
  • Automatic backup before a restore is done.


Screenshot:

http://nereid42.de/screenshots/S.A.V.E.jpg


Hints:

  • Setting "days to keep backups" to 0 will keep backups forever (as long other constraints are not violated).
  • Setting "max number backups" to 0 will keep an unlimited amount of backups (as long other constraints are not violated).
  • Setting both "days to keep backups" and "max number backups" to 0 will never delete any backup (not even failed ones).
  • The value of "min number of backups" determines the number of successful backups that have to be kept in any case.

I am in no way suggesting your mod is doing harm, I would just hate to see a good mod booted because the rules are the rules :)

My suggestion, get in contact with a moderator to double-check if this is ok! I did the same thing for my upcoming youtube series.

Link to comment
Share on other sites

My suggestion, get in contact with a moderator to double-check if this is ok! I did the same thing for my upcoming youtube series.

I have already done that. Its not finally decided, but until decision I will leave it as it is.

- - - Updated - - -

I have the same "Failed" status issue. Default settings, also tried a different directory. Unticking the "Recurse Subdirectories" box gives me a status of "OK" on all saves.

I have a new version with some kind of "retry-to-copy" to solve the issue. Unfortunately I got no reports if this solved the problem. But I will upload it anyway.

EDIT: found some bugs that have to be fixed first. So release delayed.

Edited by Nereid
Link to comment
Share on other sites

Updated to 0.9.17-387. If a file copy failed (because KSP is still accessing it), it the copy will be retried after waiting 200 ms (up to 6 times per file).

Edited by Nereid
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...