Not saving permissions on server crashNot An Issue
@Wulf
Hey again, I was here with same issue for some time ago, and again after feb8 update, servers had crashed four times and all four times the permissions, group assignments till whole day from server restart hadn't saved. Server save fires every 10minutes. I've tested such thing on other test server with same plugins, oxide version:
- assigned some permissions, added to groups, removed from groups
- run save command
- crash server with ctrl+c
- started server, but all permissions are inplace

what this could be, why crashing server server dont save assignments? idk how to test this other way and why this is happening (
- run save command

save or writecfg?

what this could be, why crashing server server dont save assignments? 

I can be wrong, but maybe because its crashed? 

There is no way for us to save if your server crashed. Oxide saves data when the server saves.
In response to Wulf ():
There is no way for us to save if your server crashed. Oxide saves data when the server saves.
let me desribe it again - the assignments on production server were before server saves, but they are not saved on crash, this happened 4 times on every crash
In response to Orange ():
- run save commandsave or writecfg?

what this could be, why crashing server server dont...
I'm taking about "save" exactly, because writecfg (that is savibng permissions) autofired only on servershutdown, but "save" - every 10 minutes eg.

but Wulf pointed that they are saving perms on every save now
https://github.com/theumod/uMod.Rust/blob/oxide/src/RustCore.cs#L181-L189
https://github.com/theumod/uMod/blob/oxide/src/OxideMod.cs#L706-L709

and what I'm pointing on - that I have 4 crashes happened on last two weeks aprox. and all times - perms were not saved, neverless that they were assigned earlier this day (many "autosaves" ago)

just example 2019-02-17 from log:

(16:08:39) | addgroup 76561198032550689 hero 30d
...
(20:48:30) | Invalidate Network Cache took 0.01 seconds
(20:48:30) | Saved 40,909 ents, cache(0.14), write(0.01), disk(0.00).
(20:48:30) | Custom Saving complete
....
(20:52:59) - here saver crash

so group assignment was NOT saved after crash, as all other assignments for whole day
In response to Wulf ():
Rust doesn't save when it crashes, doesn't really do anything other than crash when it crashes. See...
Yep, and i remember this and tested today on my test server as I've described in frist message - and all works correctly, but again - I dont understand why it's not OK on production server

Maybe it cant produce server crash correctly with "ctrl+c"? or manual "save" command differs from serversave?
If a server is crashing, it's unlikely that it will save and go through the normal shutdown procedure.
In response to Wulf ():
If a server is crashing, it's unlikely that it will save and go through the normal shutdown procedur...
I totally agree, but "save" was fired many times
just example 2019-02-17 from log:
(16:08:39) | addgroup 76561198032550689 hero 30d
...
(20:48:30) | Invalidate Network Cache took 0.01 seconds
(20:48:30) | Saved 40,909 ents, cache(0.14), write(0.01), disk(0.00).
(20:48:30) | Custom Saving complete
....
(20:52:59) - here saver crash

so group assignment was NOT saved after crash, as all other assignments for whole day
We don't control when the server decides to trigger that save, that's up to the game (i.e. Rust).
In response to Wulf ():
We don't control when the server decides to trigger that save, that's up to the game (i.e. Rust).
I agree again )
But why the group assignment was NOT saved? group assign was several hours before crash, and there were many saves between, i've only showed last one. And this is not one example
If the groups were not saved, the save process was not triggered. The command you appear to be using isn't one of our commands though, so unsure the process for it.
In response to Wulf ():
If the groups were not saved, the save process was not triggered. The command you appear to be using...
i'm using https://umod.org/plugins/save-my-map

Merged post

its config
{
  "Settings": {
    "allowOutOfDateSaves": false,
    "callOnServerSave": true,
    "delayCallOnServerSave": 3,
    "enableLoadOverride": false,
    "numberOfSaves": 20,
    "onServerSaveUseCoroutine": true,
    "saveAfterLoadFile": true,
    "saveCustomAfter": 1,
    "saveInterval": 600
  }
}​


Merged post

ye, its definitely save-my-map issue, summoning @FuJiCuRa
@wazzzup I really like it when i got randomly mentioned with one of my plugins "doing crap", without any further detailed explanation ;)
as I understand when "onServerSaveUseCoroutine" is enabled, Interface.Oxide.OnSave(); should be here
		IEnumerator SaveCoroutine()
		{
			WaitForFixedUpdate waitU = new WaitForFixedUpdate();
			var allPlugins = plugins.GetAll().Where(r => !r.IsCorePlugin);
			foreach (var plugin in allPlugins.ToList())
			{
				plugin.CallHook("OnServerSave", null);
				yield return waitU;
			}
            Interface.Oxide.OnSave();
            Covalence.PlayerManager.SavePlayerData();
			yield return null;
		}		
​


Merged post

otherwise OnServerSave is fired only for plugins, not for Oxide in RustCore.cs, i think this should be here too, from RustCore.cs
RustCore.cs#L181-L189

 [HookMethod("OnServerSave")]
        private void OnServerSave()
        {
            Interface.Oxide.OnSave();
            Covalence.PlayerManager.SavePlayerData();
     }​
Locked automatically