Server Backup Plugin

Discussion in 'Plugin Requests' started by ZW_15, Oct 22, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    ZW_15

    Plugin category: Server Admin Tools

    Minecraft version: 1.12

    Suggested name: SimpleServerBackup

    What I want: I'd like a plugin where it will backup your entire server (Ex: server files, server jar, world files, etc...)

    Ideas for commands:
    1. /backup create [name] - Creates a backup
    2. /backup cancel - Cancels a backup creation that is in progress. (The file that was being made will remain until you do something with it.)
    3. /backup info - This gives you information about how many backups are saved and the setting in the config. It will also tell you if a backup is in progress.
    4. /backup reload - Reload the config
    5. /backup restore [backup] - Restore a backup
    *copied the commands above from the EasyBackUp plugin page...


    Ideas for permissions: SimpleServer.backup & SimplerServer.restore

    When I'd like it by: ASAP
     
    Last edited: Oct 23, 2017
  2. Offline

    timtower Administrator Administrator Moderator

  3. Offline

    Zombie_Striker

    @ZW_15
    If backuplikeme is good enough for what you want, use that. However, if you need something else, then I may be able to create the plugin for you.
     
  4. Offline

    ZW_15

    @Zombie_Striker @timtower
    Backuplikeme won't work because it doesn't have automated (scheduled) back ups. Also after a back up is like it to restart the server.
     
  5. Offline

    timtower Administrator Administrator Moderator

    @ZW_15 Your request doesn't have scheduled backups either...
    Nor information about running a command after a backup.
     
  6. Offline

    Zombie_Striker

    @ZW_15
    Then I can create the plugin. But first, I need to know everything that the plugin should have/do.
     
  7. Offline

    TheWolfBadger

  8. Offline

    ZW_15

    This wont work for 1.12

    I had a plugin linked that had them features...


    Features (open)

    • Backup all files
    • Configurable file compression (up to 250% compression)
    • Lightning fast backups
    • FTP Automatic Uploads
    • Anti-lag features - If your server begins to lag, likely from in game actions, then EasyBackup will slow down a backup process to let your server catch up.
    • Scheduled automatic backups
    • Very easy to use - Place it in your plugin folder and run your server
    • Completely configurable
    • Language config
    • Backup limit setting - This makes old backups get removed when too many new ones are made.
    • The backup will be saved in a compressed rar file. This can be changed to other extensions including zip and tar.gz.


    Compression (open)
    Compression can be set between 1 and 10. The best compression level is 10. The higher you set the compression, the longer it will take to backup, but since the file will be smaller, it will be faster to download or re-upload the backup file. Level 10 compression has been tested, and it got a 1300mb server compressed into a 550mb file.



    Restoring (open)

    Restoring a backup is also possible. Before restoring, EasyBackup will automatically create a restore point backup. When restoring a backup note that ALL exempt files or unsaved files will be erased, but they will still be in the restore point backup. While restoring, do not start your server because files that are not restored yet can not be restored because bukkit/spigot will be using those files.
    Restoring takes about 60 seconds to start after you run the command. It will automatically shut down your server to run a background task. Once the server is shutdown to restore, it will take about the same amount of time as backing up your server.
    You will know the restore process has completed when the file
    Code (Text):
    restore_log.txt
    appears in your main server folder.


    Extra FTP Info (open)
    You can configure backup plugin to automatically upload files to an FTP server. This enables you to save backups to your computer or another server AUTOMATICALLY. Since backups of an entire server are fairly large, these uploads may take awhile depending on your server. Setting the compression to a higher level will speed up this process. When using FTP uploads with backup plugin, make sure your FTP server does not have access to other files, and that other people do not have access to your minecraft server or they can access your FTP server.


    Restart (open)

    In the config you can select to restart the server x amount of minutes or hours after a back up has been made.


    @Zombie_Striker
     
    Last edited: Oct 23, 2017
  9. Offline

    Zombie_Striker

  10. Offline

    ZW_15

    Last edited: Oct 24, 2017
  11. Offline

    Zombie_Striker

    @ZW_15
    FTP will come out today. I just needed some more testing before I implemented it into the final version. If you need the backups now, you can find them in the /<server>/backups/ directory.

    Automated backups are already there. By default, it will wait one day before it starts the auto server (don't want to cause any lag/confusion the moment the server starts up). You can change the time between autobackups in the config (user "Autosave"), or you can force a backup using /sr save.

    @ZW_15
    Okay, I think I got FTP working. You can now enable and edit the FTP options in the config.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 24, 2017
  12. Offline

    ZW_15

    @Zombie_Striker
    In the portion of the config can I choose the path in the config? Also if the path I choose isn't there can you have it make the path?

    Another thing is I wanted the back ups to be like this in the config...
    Code:
    #Schedule backups
    #You can add as many days to each item in the list
    #If it comes up with an error put 'text' around your schedule.
    #Note: This uses your server's local time
    backupSchedule:
    - DAY HOUR:MINUTE PM
    - HOUR:MINUTE AM (Exclude day for daily)
    - HOUR:MINUTE (24 hour time)
    - Mon Wed Fri 7:00
    - 4:00 AM 
     
    Last edited by a moderator: Oct 25, 2017
  13. Offline

    timtower Administrator Administrator Moderator

    @ZW_15 Please add information like that in the original post next time.
    And you might want to take a look at cronjobs.
     
  14. Offline

    ZW_15

    I had it all in my original post I linked a plugin similar to it... I guess a moderator like you deleted the link even those it would have been very useful.
     
  15. Offline

    timtower Administrator Administrator Moderator

    All links to paid plugins are removed.
     
  16. Offline

    ZW_15

    Thanks!
     
  17. Offline

    Zombie_Striker

    @ZW_15
    Though there isn't a way to create your own formats, you can use:
    Code:
    AutosaveDelay: 1D
    to change the delay (You can choose between expressing the values in days, using D, or in hours using H at the end). If you need it to be a mixed value (e.g. 1D, 6H, 30Min), you can express it as a decimal (i.e 1.270833D)

    As for choosing the path, I may be able to add that.
     
  18. Offline

    ZW_15

    Thanks please do with the path
     
  19. Offline

    Zombie_Striker

    @ZW_15
    I just uploaded V1.0.2. In it, after restarting the server, you can specify the destination for the backup folder in the config.
     
  20. Offline

    Tabuu_

    You can copy server files from a running server and even replace them (replacing files on a running server is not recommended). But if you want to replace an entire world you would need to unload that world first (by kicking all players from the server or to another world and then unloading the world with code).

    To come back to the request:
    I suggest if someone makes this the files will be compressed (zipped) for easier and faster moving from and to other server or computers.
     
  21. Offline

    timtower Administrator Administrator Moderator

    Good luck replacing the server itself.
     
  22. Offline

    ZW_15

    Were you able to do the paths? Also if the path isn't there have it make the path? With the "
    AutosaveDelay: 1D" If I put 12H in there will it make a backup every 12 hours?
     
  23. Offline

    Zombie_Striker

    @ZW_15
    1. Under "getBackupFileDirectory", you can either leave it blank so that it saves to "/<server>/backups/", or you can provide the full path to the directory you want the backups to be saved to.
    2. Yes, it will default to the server's directory if none is specified.
    3. Yes, 12H will force it to backup every 12 hours.
     
  24. Offline

    ZW_15

    Just wondering how do I limit the number of backsup it saves to the ftp server and have it delete the older ones?
    Another thing how long does a back up usually take? I started one and no files have been uploaded to my ftp server yet.
     
  25. Offline

    Zombie_Striker

    @ZW_15
    Just released version 1.0.3. In it, you can limit the max backup savefile by changing "MaxSaveSize".

    As for the FTP transfer, I do knot know why this is happening. I added a few more error messages in case anything went wrong. Can you download the new update and see if you receive any error messages?
     
Thread Status:
Not open for further replies.

Share This Page