Mod Details

Lua's Auto Profile Backup (Updated)

Lua's Auto Profile Backup (Updated) 1.5.0

Created by Props

4.3K Downloads

SPT 3.9.8 Compatible

No more worries to backup your profile. A minor update to Lua's mod so all options work.

Latest Version 1.5.0
SPT 3.9.8

Updated Jul 22, 2024 at 2:37 PM

Version Notes

Updated for SPT 3.9+ by Solethia (Thanks!)

Install to your base spt install directory

This download is externally hosted.
Always scan for viruses.

Auto Profile Backup

Backup your profile automatically

mod is disabled by default, check out the config file

  • Auto Profile Backup when (Configurable)
    • Game Start
    • Raid Start
    • Raid End
    • …maybe more
  • Prevent profile’s filename error by auto rename
    • You don’t have to rename the backup file
      select backup file then drop into /user/profiles folder
  • Maximum Backup Per Profile (Configurable)
  • Auto-Backup path: %SPT%/user/profiles/Autobackup/
  • Backup file format: %Event%-%ISO Timeformat%.json
    (Example: onRaidStart-2022-08-30T161622490Z.json)

**Installation

  1. Extract zip and place Lua-AutoProfileBackup folder into %SPT%/user/mods folder

How To Use

  1. Drag and Drop also edit config.json
  2. Restore backup when you need to rollback
Version 1.5.0
Download Mod Version
SPT 3.9.8 +8 more
All Compatible SPT Versions:
3.9.8 3.9.7 3.9.6 3.9.5 3.9.4 3.9.3 3.9.2 3.9.1 3.9.0

1.0K Downloads

Released Jul 22, 2024 at 2:37 PM

Fika Compatibility Unknown

Updated for SPT 3.9+ by Solethia (Thanks!)

Install to your base spt install directory

Version 1.4.0
Download Mod Version
SPT 3.8.0

885 Downloads

Released Apr 1, 2024 at 9:30 PM

Fika Compatibility Unknown

Updated for use in spt 3.8.0

Version 1.3.0
Download Mod Version
SPT 3.7.4

973 Downloads

Released Dec 9, 2023 at 7:02 PM

Fika Compatibility Unknown

Updated for SPT 3.7.4

  • Make sure to enable the backup loader in the config/config.jsonc file. Just a text editor and set the enabled parameter to true.
Version 1.2.0
Download Mod Version
Unknown SPT Version

1.0K Downloads

Released Apr 28, 2023 at 2:59 PM

Fika Compatibility Unknown

1. Added fix for raid start (it was using an outdated routing point). Other save points were working fine.

Thanks Drakia XYZ for the report.

Version 1.0.0
Download Mod Version
Unknown SPT Version

333 Downloads

Released Apr 15, 2023 at 3:59 PM

Fika Compatibility Unknown

No Addons Yet

This mod doesn't have any addons yet.

FriedEngineer

In my testing this mod just works on 3.10 after updating the sptVersion in the package.json.

I’ve also got a fix for it working on Linux and a change to the file naming scheme (putting the date first so it can be easily sorted instead of sorting by the event)

Props based on some of your other comments, it looks like you’re taking a break. I can open a PR to make this/these changes or would you prefer I fully take it over? (move it to my own repo and release it myself). I’m open to whatever, just want to be the least invasive to you and I don’t want to step on your toes

0 Likes

Feel free to make your own repo and release it on hub.

1 Like
CXM

Not working on 3.9.8

0 Likes
Strungerman

It works on my end. Maybe you have it disabled? it’s disabled by default

1 Like
unknownbomj

not working 3.9.6

0 Likes
FriedEngineer

This does not work out of the box when running it in a Linux docker container. based on the error message, it cannot determine where the profiles directory is

Error: ENOENT: no such file or directory, copyfile ‘undefined/profiles/668f65da0000eaf2b81f2ac8.json’ -> ‘undefined/profiles/AutoBackup/3.9.5/668f65da0000eaf2b81f2ac8/onGameStart-2024-08-06T071448146Z.json’ at Object.copyFileSync (node:fs:3029:11) at Object.copyFileSync (pkg/prelude/bootstrap.js:1167:16) at VFS.copyFile (/snapshot/src/utils/VFS.ts:66:12) at Mod.onEvent (/app/user/mods/lua-autoprofilebackup-1.5.0/src/mod.ts:224:18) at Object.action (/app/user/mods/lua-autoprofilebackup-1.5.0/src/mod.ts:58:34) at StaticRouterMod.handleStatic (/snapshot/src/di/Router.ts:41:63) at HttpRouter.handleRoute (/snapshot/src/routers/HttpRouter.ts:61:68) at processTicksAndRejections (node:internal/process/task_queues:95:5) at HttpRouter.getResponse (/snapshot/src/routers/HttpRouter.ts:34:25) at HttpRouter.result.getResponse (/app/user/mods/fika-server/src/overrides/routers/HttpRouter.ts:25:37) After some quick tinkering, the crux of it seems to be on mod.ts Line 165 where it tries to get it from the %SPT% variable, which I assume does not exist here. If change that line and hard-code the path to my profiles directory, making it this.profilePath = /app/user/profiles;, it works just file (note: that is the profile path for my installation, it may not be for yours!). I’m not sure where %SPT% would have been set so I’m not sure where to look at the moment. An easy way to address this could be to just have a path override option in the config file (so it defaults to use the %SPT% prefix but will take whatever you specify, if you specify something). If you’re amenable to that, I can try to put together a PR.

0 Likes

i’ll consider it for the next update. thats simple enough

0 Likes
LightoftheWorld

Oh, might be useful! I won’t accidentally delete my level 52 permanently

0 Likes
GMAK3R

now make it

(UPDATED-UPDATED)

1 Like
osumunbro

for those that also want to create a backup when the game is closed:

add to config:

“OnLogout”: true

add to mod.ts:

if (this.modConfig?.AutoBackup?.OnLogout) { staticRouterModService.registerStaticRouter( ${this.modName}-/client/game/logout, [ { url: “/client/game/logout”, action: ( url: string, info: string, sessionID: string, output: string ): string => { this.onEvent(“onLogout”, sessionID); return output; } } ], “aki” ); }

0 Likes

Не работает, все сделал как ты написал.

The application had a critical error and failed to run Exception produced: JSONError Stacktrace: JSONError: Expected ‘,’ or ‘}’ after property value in JSON at position 178 while parsing ‘{ “Enabled”: true,“BackupSavedLog”’ at C:\snapshot\project\node_modules\parse-json\index.js:26:19 at Function.parse (C:\snapshot\project\node_modules\jsonc\lib\jsonc.js:176:16) at Mod.preAkiLoad (E:\Games\Battlestate Games\SPT\user\mods\lua-autoprofilebackup-1.4.0\src\mod.ts:42:32) at PreAkiModLoader.executeModsAsync (C:\snapshot\src\loaders\PreAkiModLoader.ts:419:53) at PreAkiModLoader.load (C:\snapshot\src\loaders\PreAkiModLoader.ts:59:24) at processTicksAndRejections (node:internal/process/task_queues:95:5) at process.runNextTicks [as _tickCallback] (node:internal/process/task_queues:64:3) at Function.runMain (pkg/prelude/bootstrap.js:1984:13) at node:internal/main/run_main_module:28:49 at Program.start (C:\snapshot\src\Program.ts:30:13)

0 Likes
osumunbro

Sorry, I forgot to include the closing bracket on the if block. I edited the original comment if you want to copy it again, or you can just add the bracket yourself.

5449140e6aa309129d719812afdad027.png

e3c8f95ffc3f9b68ad0827833f658b45.png

0 Likes
ArrKayCee

Not sure if intentional but the config file is named config.jsonc and doesn’t work without editing the file extension.

0 Likes
ArrKayCee

wait wtf why does it work when its .jsonc?? oh well, I was wrong, my bad.

1 Like

jsonc is json with comments

0 Likes
ColinShark

I wanted to try this mod out, but I’m getting an ENOENT error:

Error: ENOENT: no such file or directory, copyfile ‘undefined/ba9c76fd0503c37cfab6ac04.json’ -> ‘undefined/AutoBackup/undefined/ba9c76fd0503c37cfab6ac04/onGameStart-2024-01-28T114449849Z.json’The full traceback is pointing to lines 56:34 and 212:18 in the mod.ts file

[Client Request] /client/game/start Error: ENOENT: no such file or directory, copyfile ‘undefined/ba9c76fd0503c37cfab6ac04.json’ -> ‘undefined/AutoBackup/undefined/ba9c76fd0503c37cfab6ac04/onGameStart-2024-01-28T114449849Z.json’ Error: ENOENT: no such file or directory, copyfile ‘undefined/ba9c76fd0503c37cfab6ac04.json’ -> ‘undefined/AutoBackup/undefined/ba9c76fd0503c37cfab6ac04/onGameStart-2024-01-28T114449849Z.json’ at Object.copyFileSync (node:fs:2894:3) at Object.copyFileSync (pkg/prelude/bootstrap.js:1167:16) at VFS.copyFile (C:\snapshot\project\src\utils\VFS.ts:75:12) at Mod.onEvent (C:\SPTarkov\spt372\user\mods\lua-autoprofilebackup-1.3.0\src\mod.ts:212:18) at Object.action (C:\SPTarkov\spt372\user\mods\lua-autoprofilebackup-1.3.0\src\mod.ts:56:34) at StaticRouterMod.handleStatic (C:\snapshot\project\src\di\Router.ts:50:63) at HttpRouter.handleRoute (C:\snapshot\project\src\routers\HttpRouter.ts:79:62) at HttpRouter.getResponse (C:\snapshot\project\src\routers\HttpRouter.ts:44:30) at AkiHttpListener.getResponse (C:\snapshot\project\src\servers\http\AkiHttpListener.ts:150:38) at IncomingMessage.<anonymous> (C:\snapshot\project\src\servers\http\AkiHttpListener.ts:75:43) Error: ENOENT: no such file or directory, copyfile ‘undefined/ba9c76fd0503c37cfab6ac04.json’ -> ‘undefined/AutoBackup/undefined/ba9c76fd0503c37cfab6ac04/onGameStart-2024-01-28T114449849Z.json’ Error: ENOENT: no such file or directory, copyfile ‘undefined/ba9c76fd0503c37cfab6ac04.json’ -> ‘undefined/AutoBackup/undefined/ba9c76fd0503c37cfab6ac04/onGameStart-2024-01-28T114449849Z.json’ at Object.copyFileSync (node:fs:2894:3) at Object.copyFileSync (pkg/prelude/bootstrap.js:1167:16) at VFS.copyFile (C:\snapshot\project\src\utils\VFS.ts:75:12) at Mod.onEvent (C:\SPTarkov\spt372\user\mods\lua-autoprofilebackup-1.3.0\src\mod.ts:212:18) at Object.action (C:\SPTarkov\spt372\user\mods\lua-autoprofilebackup-1.3.0\src\mod.ts:56:34) at StaticRouterMod.handleStatic (C:\snapshot\project\src\di\Router.ts:50:63) at HttpRouter.handleRoute (C:\snapshot\project\src\routers\HttpRouter.ts:79:62) at HttpRouter.getResponse (C:\snapshot\project\src\routers\HttpRouter.ts:44:30) at AkiHttpListener.getResponse (C:\snapshot\project\src\servers\http\AkiHttpListener.ts:150:38) at IncomingMessage.<anonymous> (C:\snapshot\project\src\servers\http\AkiHttpListener.ts:75:43)

0 Likes

U on 3.7.6 ?

0 Likes

Yes

0 Likes
nyrus

And it works with 3.7.1 as well!

0 Likes

Details