Duplication BugNot An Issue

If you put items in your backpack from your inventory like 5 seconds before daily restart, you log back in with them in your inventory + backpack.

This sounds like a problem with how your "daily restart" is implemented. Removing items from your inventory and then finding them still present in your inventory after restart means your server isn't saving properly before shutting down, causing a rollback to an older point in time.

Ungraceful/improper shut down of the server is known to be able to cause desync between plugin data and Rust save data, resulting in issues like duplication with Backpacks for instance. However, it is not generally considered an exploit as it is rare that players are able to trigger or anticiplate such shutdowns, with the main exception being scheduled ungraceful shutdowns, which occur when the server operator uses the wrong process or mechanism to shut down the server on a schedule. Sometimes server hosts may provide a feature to perform scheduled shutdowns ungracefully or in a DIY manner, which should be rectified by the server host.

Below is an example from my server logs when shutting down the server via the "quit" command, demonstrating that plugins unload first, then Rust saves entity/inventory data.

Unloaded plugin Backpack Button v1.1.1 by WhiteThunder
Unloaded plugin Backpacks v3.13.3 by WhiteThunder
Shutting down compiler because framework shutting down
Compiler shutdown completed
Invalidate Network Cache took 0.00 seconds
Saved 4,343 ents, cache(0.06), write(0.00), disk(0.01).
Saving complete
Config Saved

Hi , my servers are already set to schedule shutdowns . They shut down correctly

Merged post

It duplicates every item 3b2GAwPiXcAO8yH.png

You say your servers shutdown correctly, but have provided no evidence of that. On the contrary, the behavior you described, where items removed from your inventory (regardless of where you moved them to) remained in your inventory after restart, is evidence that your server is not saving at the correct moment during the shutdown proccess (i.e., not shutting down correctly).

Do you know precisely how your scheduled reboot works? Does it send the "quit" command? If it does not send the "quit" command, what does it do instead? Does it send any other commands before hand? Do you own the scheduled reboot functionality (i.e., is it a custom script you developed and are responsible for), or is it provided by a server host? Even if it is provided by a server host, that does not necessarily mean that it shuts down the server correctly. Do not simply assume that the server host knows how to correctly shut down a Rust server just because it's their business.

I have explained what a proper shutdown looks like and provided sample server logs, but as you have not yet provided any logs from your server for comparison, there are no further insights or proposed solutions I can provide.

I tested by moving items from my inventory into my backpack, then immediately issuing the quit command in the server console and no items were duplicated. All items I had moved were no longer in my inventory and were found in the backpack, as expected. I suggest you do the same test, as that will help determine whether there is a difference between our servers or merely an issue with your scheduled restart process.

01/26 05:59:54 | Restarting in 10 seconds
01/26 05:59:55 | Restarting in 9 seconds
01/26 05:59:56 | Restarting in 8 seconds
01/26 05:59:57 | Saved 92,144 ents, cache(0.27), write(0.08), disk(0.02).
01/26 05:59:57 | Saving complete
01/26 05:59:57 | Restarting in 7 seconds
01/26 05:59:58 | Restarting in 6 seconds
01/26 05:59:59 | Restarting in 5 seconds
01/26 06:00:00 | Restarting in 4 seconds
01/26 06:00:01 | Restarting in 3 seconds
01/26 06:00:02 | Restarting in 2 seconds
01/26 06:00:03 | Restarting in 1 seconds
01/26 06:00:07 | Saving plugin configuration and data..
01/26 06:00:07 | Shutting down Carbon..
 
I have it counting down for 10 mintutes before it restarts , im not sending the full log as it shows players ips


Merged post

I have a trigger that is set to run the command restart 600

Thank you for providing those logs. I'm able to make the following observations.

  • You are using Carbon, not Oxide, so that may cause different behavior.
  • You are using the "restart" command, not the "quit" command. That should be okay, because the "restart" command sends the "quit" command once the time runs down, according to the Rust code. I also tested with the "restart" command on Oxide and found no issues (same results as I posted earlier).
  • Plugins do not appear to be unloading before shut down, since there are no messages stating that plugins are unloading, as there is with Oxide. It's unclear what "Saving plugin configuration and data" means, since plugins are generally responsible for saving their own data and configuration rather than offloading that to the framework. Maybe that message refers to the framework unloading all plugins, but unclear.
  • The server does not appear to be saving right before shutting down, but saving right before shutdown is expected according to the vanilla Rust implementation of the "restart"/"quit" command. There happens to be a server save 10 seconds before shut down, but it's unclear what triggered that. Either Carbon triggered that or it is a scheduled save according to the frequency of the server.saveinterval convar (every 10 minutes by default).
My best guess is that these differences in behavior are the result of how Carbon is implemented. I suggest you work with the Carbon devs to further disambiguate this and to align the Carbon shutdown behavior with the Oxide shutdown behavior.

Thanks bud , I will look into it 

Locked automatically