DriveBackup
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.
"Sign in with Google temporarily disabled for this app"
How can I fix?
In reply to Forge_User_19789781:
Hey!
I ran into the same issue. I dug through the source code and figured out that the Google Drive API has changed since this plugin was published, which is no surprise since the plugin was last modified 4 years ago.
I've updated the plugin to work with the new Google Drive API. My updated version is available here: https://dev.bukkit.org/projects/drivebackupv2
(My version is also a lot easier to set up)
But the backup is only a few bytes and it says there is nothing inside of the zip file? How does one recover the world once it has been backed up? And is there a way to change the directory of what it is backing up?
@5899
Works perfectly with 1.10.2. I'm running it nightly with a current build of paper.
@funkster192
This issue has been reported here. Adding your pastebin there might help the dev locate the issue.
Many thanks to Ratismal for this awesome plugin. I searched over a month and this was the only plugin I located that will upload to google drive. I sleep easier knowing my server is safely backed up to the cloud.
/give Ratismal cookie 1 0 {display:{Lore:["Cookie of Awesomeness!"]}} :D
This crashes my server running spigot 1.10.2 or paper spigot 1.10.2 builds when it automatically backs up. Strangely enough when I run a manual back up via cmd it works fine. Only scheduled back ups crash it.
1.10.2?
@FatherWh0
DriveBackup doesn't have any utilities in place to restore backups, you'd have to do this yourself. You can simply extract the files from the .zip and overwrite your current files.
How would a person restore?
@relaxed83
That is indeed where you change where to store the local backups. However, there's some issues with how yours is set up. If you put a "/" in the front of the directory, it would put it in the root directory. In other words, drivebackup is attempting to store the backups in "/backups" of your entire system. Naturally, it won't have permissions to do this so nothing will happen. Try removing the initial slash and seeing if it works better.
@Ratismal
I did check the folder under home/minecraft/backups and it's empty....
I know they are case sensitive... How do I set the directories in the config file?
like this?
I'm confused on how and where the backup is savings to directory... I'm rarely had this much trouble setting up a plugin :( I feel like I am being an idiot... it seems so straight forward but it just isn't working...
@relaxed83
Depending on the size of your world, it is entirely plausible for it to finish in under a second. Can you check the backups folder to see if they're being made?
Also on linux, keep in mind that all files/directories are CaSe SeNsItIvE. Make sure what you have in your config matches exactly with the file name!
@Ratismal
I appreciate you rewriting the backup folders for me... but it still wont work...
[10:59:34 INFO]: [DriveBackup] Forcing a backup. [10:59:34 INFO]: [DriveBackup] Creating backups, server may lag for a little while... [10:59:34 INFO]: [DriveBackup] Backup complete.
is what I get when I try to force a backup... it apparently does a backup but in less than a second which obviously isn't working... I have my minecraft server running on /home/minecraft/ directory in debian. Please help..
@relaxed83
You've done the configs wrong. I've redone them here for reference. Let me know if it works!
Greetings I am having the worst luck getting drivebackup to actually backup ... for some reason I must have the folders messed up under backup-list ... I don't think the config file is very descriptive with the format of how the list is set... I tried to force a backup and the backup processes but finishes instantly... obviously that cannot be right... so I'd like to know what I am doing wrong... I'd gladly share my config file
@neonhomer
Would it be possible for me to see your config file?
@jacksharkben
Sorry for the late response! dev.bukkit stopped emailing me notifications about comments for some reason. If you're still having this issue, could I get more information about what you're trying to do and what's happening?
@Ratismal
i cant get the link to one drive to work
Could this plugin be updated to 1.9? It works though, but still getting some errors in the console
@Harrison015
There is! Check the config under the "backup-list" node. You can back up any folder in the root directory.
Is there a way to backup multiple worlds? If not, can you implement it?