The latest version is 1.1.0. If you don't see this version, wait a little bit. It's probably still being approved.
What is this?
Have you ever lost your world before?
Maybe your hard drive died. Maybe you used a web hosting service that terminated without warning. Maybe you just accidentally deleted it.
DriveBackup is a plugin that aims to provide an extra layer of security to your data.
What does it do?
- Creates and uploads backups to Google Drive, OneDrive, or a remote FTP server.
- Deletes backups locally and remotely if they exceed a specified amount
- Can create a backup out of any folder in the root directory
- If you already have a utility creating certain backups (eg. world) you can choose not to create that kind of backup and instead upload the existing ones
When choosing between Google Drive and OneDrive, keep in mind that OneDrive has a 10GB upload limit per file and uploads substantially slower than Google Drive.
How do I use it?
If you're using FTP, you simply need to fill in the config with login information and can disregard the following instructions.
Setup is a little bit tricky if your server doesn't have a UI, as Google Drive and OneDrive require an oauth2 authentication to upload files to your account. You have two options:
Option 1
For Google Drive, run the plugin on a computer with a UI. Run the backup command. The plugin will open a webpage asking for permission to use your Google Drive. After saying 'allow', copy the StoredCredential file from the plugins/DriveBackup folder onto your server's plugins/DriveBackup folder.
For OneDrive, go here. After saying 'allow', it will redirect you to another webpage. Take the URL and find where it says '?code=' and copy the code that follows it. You then need to create a file called OneDriveCredential.json. Fill the file with the following:
{ "code": "<your code here>" }
Place the OneDriveCredential.json file in your plugins/DriveBackup folder.
Option 2
I have made a companion program to generate the StoredCredential file without running the plugin. It is available here. Simply extract, run the .bat file, and follow the instructions. Afterwards, copy the StoredCredential/OneDriveCredential.json file into the plugins/DriveBackup folder.
After That
For OneDrive, you must do a backup within 3600 seconds (1 hour) of generating the credential or it will expire! After that, your backups can be as far apart as you want.
Make sure to do the config! You need to direct it to the backup folder, and give it the naming format that your backups are in. Instructions can be found in the config file.
Commands
- /drivebackup
- base command, shows a list of commands - drivebackup
- /drivebackup v
- displays plugin version - drivebackup
- /drivebackup reloadconfig
- reloads configs - drivebackup.reloadconfig
- /drivebackup backup
- uploads backup to Google Drive - drivebackup.backup
Config
The most recent default config file can be found here. This config may have unimplemented features if I'm working on an update.
Metrics
This plugin uses Metrics for anonymous usage statistics collections. You can opt out of the statistics collection for this plugin specifically at any time by disabling it in the config. You can opt out of Metrics altogether by editing plugins/Plugin Metrics/config.yml and changing the "opt-out" node to true.You can view the collected statistics at mcstats.org/plugin/DriveBackup. Collected stats are:
- General Stats (How many total servers use the plugin, and the combined number of players on all the servers)
- Server Location
- Metrics Version
- Minecraft Version
- Java Version
- Operating System (Version, name, architecture)
- System Core Count
- Server Version
- Whether the server is on offline or online mode
- Which services are enabled (Google Drive, OneDrive, FTP, or none)
Found a bug?
If something goes wrong, let me know! You can post a comment here, but I'd much prefer if you made a ticket on my github repo. Thanks!
Disclaimers
This project needs access to your Google Drive/OneDrive in order to upload files. The plugin will NOT do anything besides upload files, create a backup folder to put the files in if necessary, and delete old backups if specified. This project is open source, so if you have any questions as to what this project does or how it does it you can always check the source here. Use at your own risk.
I will never charge money for my plugins. If you want to support me, feel free to donate here.