Add Option To Backup TheNewEconomy Balances
Description of Feature
Add to the backup process when enabled in Wardenctl config (wardenctl.conf) to extract all player balances with their associated username for TheNewEconomy plugin.
Reason For Feature
- It has been found that TheNewEconomy database can get corrupted on occasion. Therefore having the data extracted helps to restore player's associated currency balance.
- This aids in server migration.
Command Behaviour
The data is extracted running the command tne extract
.
- On the run of the command the file
extracted.yml
is created at the root of the plugin directory (e.g. /srv/minecraft/paper/server/plugins/TheNewEconomy/extracted.yml). - On the second and sequential runs of the command it creates a sub-directory called
extractions
at the root of the plugin directory (e.g. /srv/minecraft/paper/server/plugins/TheNewEconomy/extractions). Then the previouslyextracted.yml
file is moved to theextractions
sub-directory changing the file name toextracted-YYYY-MM-DD-HH-MM-SS.yml
. TheYYYY-MM-DD-HH-MM-SS
is dynamically populated with the current datatime values.-rw-rw---- 1 minecraft minecraft 1.1K Jan 18 20:31 extracted-2020-01-18-20-47-10.yml -rw-rw---- 1 minecraft minecraft 957 Jan 18 20:59 extracted-2020-01-18-21-30-17.yml -rw-rw---- 1 minecraft minecraft 965 Jan 25 11:29 extracted-2020-02-28-17-04-42.yml
Note: The file extracted.yml
must be existing in the root of the plugin directory (e.g. /srv/minecraft/paper/server/plugins/TheNewEconomy/extracted.yml) before the data is moved to the sub-directory extractions
.
Edited by Adam