No more worries to backup your profile. A minor update to Lua's mod so all options work.
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
- You don’t have to rename the backup file
- 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
- Extract zip and place Lua-AutoProfileBackup folder into %SPT%/user/mods folder
How To Use
- Drag and Drop also edit config.json
- Restore backup when you need to rollback
1.0K Downloads
Released Jul 22, 2024 at 2:37 PM
Fika Compatibility UnknownUpdated for SPT 3.9+ by Solethia (Thanks!)
Install to your base spt install directory
885 Downloads
Released Apr 1, 2024 at 9:30 PM
Fika Compatibility UnknownUpdated for use in spt 3.8.0
973 Downloads
Released Dec 9, 2023 at 7:02 PM
Fika Compatibility UnknownUpdated 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.
1.0K Downloads
Released Apr 28, 2023 at 2:59 PM
Fika Compatibility Unknown1. Added fix for raid start (it was using an outdated routing point). Other save points were working fine.
Thanks Drakia XYZ for the report.
333 Downloads
Released Apr 15, 2023 at 3:59 PM
Fika Compatibility UnknownNo Addons Yet
This mod doesn't have any addons yet.
Details
-
GUID
Not Available
-
Additional Authors
-
License
-
Fika Compatibility Unknown
In my testing this mod just works on 3.10 after updating the
sptVersionin thepackage.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
Not working on 3.9.8
not working 3.9.6
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.Oh, might be useful! I won’t accidentally delete my level 52 permanently
now make it
(UPDATED-UPDATED)
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” ); }Not sure if intentional but the config file is named config.jsonc and doesn’t work without editing the file extension.
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)
And it works with 3.7.1 as well!