Member
Level 1
New Explorer
0

Forum Posts

1 - 1 of 1

    HyScript7
    09/03/2022 7:41 am
    Level 1 : New Explorer
    I'm not much of a java dev, but I do know that can backup files with a batch script that tar zips all world files and moves them into some backup directory.
    I suggest that what you do is have a run/start.bat script that will run the paper server and also handles the backups.
    When the server stops you can have the script check what time it is, and based off that you can either make a backup, load a backup or just restart the server (because it may just crash sometimes if your players do something stupid, you don't want to backup or discard world files if that happens).
    The command you can use to create the backup is:tar -czvf ./world.tar.gz ./worldThis will backup the folder "world" and create a zip file called "world.tar.gz" in the folder where the script was launched.
    When loading the backup you want to unzip that using:
    tar -xzvf ./world.tar.gz ./Which will unzip the zip file world.tar.gz into the local folder, meaning it will most likely create a new folder called "world" if it was deleted, which it probably should be considering what you want to do.
    Im not entirely sure how this will behave in practice, so I recommend you do some testing first... a lot of testing to be safe.

    How to use tar on windows
    How to unzip tar.gz on windows

    Hopefully I helped you a bit.
    2

1 - 1 of 1

Welcome