DriveBackupV2

DriveBackupV2

46.6k Downloads

(CRITICAL) Failed to upload to OneDrive, filled up local drive instead

ProfessorTox opened this issue ยท 4 comments

commented

This issue is very critical as it completely filled up the local drive; had I not noticed this could have had very bad consequences.

I've had a OneDrive account linked to DriveBackupV2 for several weeks without issue. Backups would be made, uploaded successfully, and deleted from the local backup folder. However, seemingly randomly, I got the following error in console. I am unsure if this was when the drive was already full, but shortly after I had other plugins such as CoreProtect complaining that disk was full. The disk filled up from the plugin storing many local backups despite having this in the configuration local-keep-count: 0.

There were no notifications that I had seen as a server operator. Perhaps the OneDrive token expired?

[05:34:42] [Server thread/INFO]: Automatic saving is now disabled
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/INFO]: Backup Manager \u203A Creating backups, the server may lag for a little while...
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: ratismal.drivebackup.DriveBackup.lib.JSONException: JSONObject["access_token"] not found.
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.DriveBackup.lib.JSONObject.get(JSONObject.java:572)
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.DriveBackup.lib.JSONObject.getString(JSONObject.java:859)
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.onedrive.OneDriveUploader.retrieveNewAccessToken(OneDriveUploader.java:248)
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.onedrive.OneDriveUploader.<init>(OneDriveUploader.java:202)
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.UploadThread.run(UploadThread.java:136)
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:100)
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at java.base/java.lang.Thread.run(Thread.java:831)
[05:34:42] [Craft Scheduler Thread - 28 - DriveBackupV2/INFO]: Backup Manager \u203A Doing backups for "world"
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/INFO]: Backup Manager \u203A Uploading file to OneDrive
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: java.lang.Exception: Couldn't create folder backups
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.onedrive.OneDriveUploader.createFolder(OneDriveUploader.java:457)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.onedrive.OneDriveUploader.uploadFile(OneDriveUploader.java:274)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.UploadThread.doSingleBackup(UploadThread.java:305)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.UploadThread.run(UploadThread.java:195)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:100)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at java.base/java.lang.Thread.run(Thread.java:831)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: java.lang.NullPointerException: Cannot invoke "java.io.RandomAccessFile.close()" because "this.raf" is null
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.onedrive.OneDriveUploader.uploadFile(OneDriveUploader.java:331)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.UploadThread.doSingleBackup(UploadThread.java:305)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.UploadThread.run(UploadThread.java:195)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:100)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at java.base/java.lang.Thread.run(Thread.java:831)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/INFO]: Backup Manager \u203A Doing backups for "plugins"
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: java.lang.NullPointerException: Cannot invoke "java.util.Map$Entry.getValue()" because the return value of "java.util.NavigableMap.firstEntry()" is null
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.util.FileUtil.getNewestBackup(FileUtil.java:64)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.UploadThread.doSingleBackup(UploadThread.java:298)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at ratismal.drivebackup.UploadThread.run(UploadThread.java:195)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:100)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/WARN]: 	at java.base/java.lang.Thread.run(Thread.java:831)
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/INFO]: Backup Manager \u203A Backup complete, the next backup is in 116 minutes
[05:37:49] [Craft Scheduler Thread - 28 - DriveBackupV2/INFO]: Backup Manager \u203A Disabling automatic backups due to inactivity
[05:37:49] [Server thread/INFO]: Automatic saving is now enabled
commented

We were testing something out yesterday and may have temporarily disabled the OneDrive token exchange by accident. It should be working again now. Can you try deleting the local backups and seeing if the issue persists?

commented

Did this resolve your issue?

commented

Did this resolve your issue?

After discovering it and replacing the OneDrive token it appeared to be working. However, that still doesn't address the root issue that the plugin will overflow the backup directory beyond what it is allowed.

commented

The issue with backups overflowing has been resolved in our beta. If you would like to test it, please join our Discord, otherwise a published update should be published soon once all bugs have been ironed out