[Bug] Failed to delete backups exceeding limit
noyyyy opened this issue · 2 comments
Describe the bug
I think #74 occur again in this version, while it doesn't affect me now because the remote backup count is less than what I set.
To Reproduce
Connect onedrive, use onedrive as remote to make backup
Screenshots / Videos
No response
Server and Plugin Versions
Paper 1.20.1
DriveBackupV2 1.6.0/1.6.1
Logs
[04:00:01 INFO]: [DriveBackupV2] Creating backups, the server may lag for a little while...
[04:00:01 INFO]: [DriveBackupV2] Doing backups for "."
[04:11:05 INFO]: [DriveBackupV2] Uploading file to OneDrive
[05:09:33 INFO]: [DriveBackupV2] Failed to delete backups exceeding limit
[05:09:33 WARN]: ratismal.drivebackup.DriveBackup.lib.JSONException: JSONObject["value"] not found.
[05:09:33 WARN]: at DriveBackupV2.jar//ratismal.drivebackup.DriveBackup.lib.JSONObject.get(JSONObject.java:572)
[05:09:33 WARN]: at DriveBackupV2.jar//ratismal.drivebackup.DriveBackup.lib.JSONObject.getJSONArray(JSONObject.java:765)
[05:09:33 WARN]: at DriveBackupV2.jar//ratismal.drivebackup.uploaders.onedrive.OneDriveUploader.pruneBackups(OneDriveUploader.java:449)
[05:09:33 WARN]: at DriveBackupV2.jar//ratismal.drivebackup.uploaders.onedrive.OneDriveUploader.uploadFile(OneDriveUploader.java:226)
[05:09:33 WARN]: at DriveBackupV2.jar//ratismal.drivebackup.UploadThread.doSingleBackup(UploadThread.java:379)
[05:09:33 WARN]: at DriveBackupV2.jar//ratismal.drivebackup.UploadThread.run(UploadThread.java:238)
[05:09:33 WARN]: at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:101)
[05:09:33 WARN]: at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[05:09:33 WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[05:09:33 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[05:09:33 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[05:09:33 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[05:09:33 INFO]: [DriveBackupV2] Failed to upload
[05:09:33 INFO]: [DriveBackupV2] There are 1 file(s) which exceeds the local limit of 0, deleting oldest
[05:09:33 INFO]: [DriveBackupV2] Failed to backup to OneDrive, verify all credentials are correct or diagnose the problem with /drivebackup test onedrive
[05:09:33 INFO]: [DriveBackupV2] Backup complete
Config
# ################################################
# DriveBackupV2 - by Max Maeder (MaxTheGinus)
# ################################################
# DOCUMENTATION HAS MOVED
# Now available online at: https://github.com/MaxMaeder/DriveBackupV2/wiki
version: 2
delay: -1
backup-thread-priority: 1
keep-count: 20
local-keep-count: 0
zip-compression: 1
backups-require-players: true
disable-saving-during-backups: true
scheduled-backups: true
backup-schedule-list:
- days:
- "everyday"
time: "04:00"
backup-list:
- path: .
format: Backup-Neverland-server-%FORMAT.zip
create: true
local-save-directory: backup
remote-save-directory: mc-backup
googledrive:
enabled: false
shared-drive-id: ''
onedrive:
enabled: true
dropbox:
enabled: false
webdav:
enabled: false
hostname: http://example.com/directory
username: Username
password: Password
nextcloud:
enabled: false
hostname: https://example.com/remote.php/dav/files/user/
username: Username
password: Password
chunk-size: 20000000
ftp:
enabled: false
hostname: ftp.example.com
port: 21
sftp: false
ftps: false
username: Username
password: Password
messages:
send-in-chat: true
prefix: '&6[&4DriveBackupV2&6] '
default-color: '&3'
advanced:
metrics: true
update-check: true
suppress-errors: false
debug: false
date-language: en
date-timezone: +08:00
ftp-file-separator: /
Additional Information
No response
I have the same problem here on my 1.20.4 purpur Server. But only on the world:world. All other maps and the plugins work fine.
02.03 10:04:50 [Server] INFO [DriveBackupV2] Doing backups for "plugins"
02.03 10:04:50 [Server] INFO [DriveBackupV2] There are 1 file(s) which exceeds the local limit of 0, deleting oldest
02.03 10:04:50 [Server] INFO [DriveBackupV2] File uploaded in 17.29 seconds (11251.24KB/s)
02.03 10:04:33 [Server] INFO [DriveBackupV2] Uploading file to OneDrive
02.03 10:04:23 [Server] INFO [DriveBackupV2] Doing backups for "./world_the_end"
02.03 10:04:23 [Server] WARN at java.base/java.lang.Thread.run(Thread.java:833)
02.03 10:04:23 [Server] WARN at DriveBackupV2.jar//ratismal.drivebackup.UploadThread.run(UploadThread.java:238)
02.03 10:04:23 [Server] WARN at DriveBackupV2.jar//ratismal.drivebackup.UploadThread.doSingleBackup(UploadThread.java:394)
02.03 10:04:23 [Server] WARN at DriveBackupV2.jar//ratismal.drivebackup.util.FileUtil.pruneLocalBackups(FileUtil.java:142)
02.03 10:04:23 [Server] WARN at DriveBackupV2.jar//ratismal.drivebackup.util.FileUtil.getLocalBackups(FileUtil.java:49)
02.03 10:04:23 [Server] WARN java.lang.NullPointerException: Cannot read the array length because "" is null
02.03 10:04:23 [Server] INFO [DriveBackupV2] Local backup deletion failed
02.03 10:04:23 [Server] WARN at java.base/java.lang.Thread.run(Thread.java:833)
02.03 10:04:23 [Server] WARN at DriveBackupV2.jar//ratismal.drivebackup.UploadThread.run(UploadThread.java:238)
02.03 10:04:23 [Server] WARN at DriveBackupV2.jar//ratismal.drivebackup.UploadThread.doSingleBackup(UploadThread.java:368)
02.03 10:04:23 [Server] WARN at DriveBackupV2.jar//ratismal.drivebackup.util.FileUtil.getLocalBackups(FileUtil.java:49)
02.03 10:04:23 [Server] WARN java.lang.NullPointerException: Cannot read the array length because "-local6-" is null
02.03 10:04:23 [Server] INFO [DriveBackupV2] Failed to upload
This issue should be fixed in the latest dev builds, you can download them from our GitHub actions
https://github.com/MaxMaeder/DriveBackupV2/actions/workflows/maven.yml?query=branch%3Amaster
After trying the latest dev build if you are still having issues please join our discord server.
https://discord.gg/83mYV4jwpA