Minepacks icon indicating copy to clipboard operation
Minepacks copied to clipboard

Player lost backpack inventory without error.

Open wolfymation opened this issue 2 years ago • 4 comments

Information

Environment information Plugin + server version info: Minepacks version 2.4.20.4 + Server Version git-Purpur-1985 MC: 1.19.4 + Java 17.0.7


<!-- Replace this with the output of "/backpack version". You can run the command in your console or as op ingame. -->

```[07:07:56 INFO]: ##### Start Minepacks version info #####
[07:07:56 INFO]: Minepacks: 2.4.20.4
[07:07:56 INFO]: Server: git-Purpur-1985 (MC: 1.19.4)
[07:07:56 INFO]: Java: 17.0.7
[07:07:56 INFO]: #####  End Minepacks version info  #####

*Online mode*: no<!-- Replace this with "yes" if your server is running in online mode, with "no" if your server is running in offline mode (if you are using BungeeCord please use your BungeeCord online mode!) -->

*BungeeCord*: <!-- Replace this with "yes" you use BungeeCord, with "no" if not -->Using Velocity

**Server/crash log**
<!-- If you see an error message in the console/log please provide it. Please provide at least 10 lines befor and after the error! If you like to share the full log file please use https://gist.github.com/
The log can contain user related information like ip, name or uuid, so please replace them if they are not necessary. -->
```No error messages

<!-- Replace this with your crash log / link to your log file -->
none

Plugin config (optional)


<!-- Replace this with details about your config -->

Details

Description

One of my players lost his backpack without any error message. Others backpack work. In a previous version backpacks weren't able to load but since the latest release they all work, except for him. But with no errors.

Steps to reproduce

Open backpack -> its empty

Expected behavior

open backpack -> not empty but having his stuff

Other information (e.g. detailed explanation, related issues, suggestions how to fix, links for us to have context, screenshots, etc.)

wolfymation avatar Jun 19 '23 07:06 wolfymation

The player probably interacted with the backpack after it didn't load initially. If you have a backup of the database, you could restore that backpack from the backup.

I will add logic to also create a backup of the backpack when it fails to load, to make restoring it simpler.

GeorgH93 avatar Jun 19 '23 09:06 GeorgH93

I have a backup and the old database.db file. How can I read this file? I only want to restore the backpack for that one player who had this issue.

Also, is there any function for automatic backups just for backpacks rn?

wolfymation avatar Jun 19 '23 16:06 wolfymation

You can open the database files with DB Browser for SQLite. You can open the backup file, go to the Browse Data tab, check the player_id column for the player. Then change the Table to backpacks, look for the player id in the owner column, select the BLOB text in the itemstacks column. On the right side of the window there is a button for export that you can use to export the backpack from the backup. After that you can open your production database, go back to the backpacks table and search for the right column again and when selecting the BLOB again, you can use the import button on the right side to load the backup. Now click Write Changes and you start your server.

Currently there is only manual backup and automatic backup if the plugin detects an issue saving the backpack.

GeorgH93 avatar Jun 20 '23 23:06 GeorgH93

Appreciate it, thanks!

Am Mi., 21. Juni 2023 um 01:38 Uhr schrieb GeorgH93 < @.***>:

You can open the database files with DB Browser for SQLite https://sqlitebrowser.org/. You can open the backup file, go to the Browse Data tab, check the player_id column for the player. Then change the Table to backpacks, look for the player id in the owner column, select the BLOB text in the itemstacks column. On the right side of the window there is a button for export that you can use to export the backpack from the backup. After that you can open your production database, go back to the backpacks table and search for the right column again and when selecting the BLOB again, you can use the import button on the right side to load the backup. Now click Write Changes and you start your server.

Currently there is only manual backup and automatic backup if the plugin detects an issue saving the backpack.

— Reply to this email directly, view it on GitHub https://github.com/GeorgH93/Minepacks/issues/269#issuecomment-1599737126, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASMXROKZE2G7FJFL6UR6Q3TXMIYA3ANCNFSM6AAAAAAZLPZ47M . You are receiving this because you authored the thread.Message ID: @.***>

wolfymation avatar Jun 24 '23 08:06 wolfymation