Closed x0rtrunks closed 7 months ago
To avoid backup crash the backuper is blocking any operations with the world folders during the backup. That means that you should just ignore this warnings but also you can set "notSetReadOnly: true". In this case the backuper will not block operations with the world folders but it may cause the backup crash
Please consider at least catching the error messages and informing the user about what is happening. For me I've decided to move away from a backup plugin and will use an OS level backup solution to capture the entire server installation.
Ok, I will try to catch this error. To capture the entire server installation you also can use "addDirectoryToBackup" field in the backuper config. This way you can specify all additional directories you need to be backed up
Can the addDirectoryToBackup field also allow for backing up the files in the root of the main folder?
Do you mean the Minecraft server folder? If so I think yes, it depends on folder permissions
Specify your operating system, minecraft server core and minecraft version 1.20.4 paper docker on linux mint
Enter your config `# DO NOT CHANGE configVersion: 6.0 lastBackup: 1714028605 lastChange: 1714003999
(true/false) Automatic backup once in a specified period
autoBackup: true
(Path) Full directory where backups will be stored
backupsFolder: plugins/Backuper/Backups
(Path list) (An example of how to set a list is below) Full directory paths to backup (Worlds will be backed up automatically, so you do not need to specify world folders there) (For example you can specify "plugins", "config")
addDirectoryToBackup:
- plugins
- config
- ...
addDirectoryToBackup:
(Path list) (An example of how to set a list is below) Full directory paths to exclude from backup. If you want to backup everything from the folder1 except some folder1/file1 you can specify folder1 in addDirectoryToBackup and folder1/file1 in excludeDirectoryFromBackup. (The backupsFolder directory will be excluded automatically to prevent the loop)
excludeDirectoryFromBackup:
- path1
- path2
- ...
excludeDirectoryFromBackup: []
(STOP, RESTART, NOTHING) What to do after an automatic backup
afterBackup: RESTART
(0 - 23). Automatic backups will be made at this time every day. (backupPeriod will be automatically set to 24 hours). -1 to disable backup time fixation
backupTime: 7
(MINUTES > 0 or -1) Backup period. To change this value you need to set backupTime to -1 and autoBackup to true
backupPeriod: 1440
(true/false) The backup will only occur if the world has been changed since the last backup. If the world has not been changed, this backup cycle will be skipped
skipDuplicateBackup: true
(>= 0) Max backups in backups folder, 0 to make it unlimited
maxBackupsNumber: 14
(MB >= 0) Max backups folder weight, 0 to make it unlimited
maxBackupsWeight: 0
(true/false) Should backups be packaged in a zip archive
zipArchive: true
(SECONDS < backupPeriod * 60 or -1) A notification about the server restart will be sent to all players on the server {alertTimeBeforeRestart} seconds before the restart. -1 to disable notifications
alertTimeBeforeRestart: 60
(true/false) Notifications will be sent only if the server will be restarted or stopped after the backup
alertOnlyServerRestart: true
(true/false) Better logging (Some statistic and other information for debugging, you probably don't need it)
betterLogging: false
Backuper marks all world folders as Read Only to prevent folder changing that may cause backup crash. To disable this feature set notSetReadOnly = true
notSetReadOnly: false `
Describe the bug
minecraft | [06:59:00] [Server thread/INFO]: Server will be backed up and restarted in 60 second(s) minecraft | [07:00:00] [Server thread/INFO]: Backup process has been started minecraft | [07:00:22] [Server thread/ERROR]: Failed to save level ./worlds/Nolan_Survive minecraft | java.nio.file.AccessDeniedException: ./worlds/Nolan_Survive/level17225327925062647743.dat minecraft | at sun.nio.fs.UnixException.translateToIOException(Unknown Source) ~[?:?] minecraft | at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source) ~[?:?] minecraft | at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source) ~[?:?] minecraft | at sun.nio.fs.UnixFileSystemProvider.newByteChannel(Unknown Source) ~[?:?] minecraft | at java.nio.file.Files.newByteChannel(Unknown Source) ~[?:?] minecraft | at java.nio.file.Files.createFile(Unknown Source) ~[?:?] minecraft | at java.nio.file.TempFileHelper.create(Unknown Source) ~[?:?] minecraft | at java.nio.file.TempFileHelper.createTempFile(Unknown Source) ~[?:?] minecraft | at java.nio.file.Files.createTempFile(Unknown Source) ~[?:?] minecraft | at net.minecraft.world.level.storage.Convertable$ConversionSession.a(Convertable.java:614) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.world.level.storage.Convertable$ConversionSession.a(Convertable.java:607) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.level.WorldServer.saveIncrementally(WorldServer.java:1503) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1546) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1226) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at java.lang.Thread.run(Unknown Source) ~[?:?] minecraft | [07:00:22] [Server thread/ERROR]: Failed to save level ./worlds/Nolan_Survive_nether minecraft | java.nio.file.AccessDeniedException: ./worlds/Nolan_Survive_nether/level9295132195270915252.dat minecraft | at sun.nio.fs.UnixException.translateToIOException(Unknown Source) ~[?:?] minecraft | at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source) ~[?:?] minecraft | at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source) ~[?:?] minecraft | at sun.nio.fs.UnixFileSystemProvider.newByteChannel(Unknown Source) ~[?:?] minecraft | at java.nio.file.Files.newByteChannel(Unknown Source) ~[?:?] minecraft | at java.nio.file.Files.createFile(Unknown Source) ~[?:?] minecraft | at java.nio.file.TempFileHelper.create(Unknown Source) ~[?:?] minecraft | at java.nio.file.TempFileHelper.createTempFile(Unknown Source) ~[?:?] minecraft | at java.nio.file.Files.createTempFile(Unknown Source) ~[?:?] minecraft | at net.minecraft.world.level.storage.Convertable$ConversionSession.a(Convertable.java:614) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.world.level.storage.Convertable$ConversionSession.a(Convertable.java:607) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.level.WorldServer.saveIncrementally(WorldServer.java:1503) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1546) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1226) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at java.lang.Thread.run(Unknown Source) ~[?:?] minecraft | [07:00:22] [Server thread/ERROR]: Failed to save level ./worlds/Freebuild minecraft | java.nio.file.AccessDeniedException: ./worlds/Freebuild/level17032395663815198379.dat minecraft | at sun.nio.fs.UnixException.translateToIOException(Unknown Source) ~[?:?] minecraft | at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source) ~[?:?] minecraft | at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source) ~[?:?] minecraft | at sun.nio.fs.UnixFileSystemProvider.newByteChannel(Unknown Source) ~[?:?] minecraft | at java.nio.file.Files.newByteChannel(Unknown Source) ~[?:?] minecraft | at java.nio.file.Files.createFile(Unknown Source) ~[?:?] minecraft | at java.nio.file.TempFileHelper.create(Unknown Source) ~[?:?] minecraft | at java.nio.file.TempFileHelper.createTempFile(Unknown Source) ~[?:?] minecraft | at java.nio.file.Files.createTempFile(Unknown Source) ~[?:?] minecraft | at net.minecraft.world.level.storage.Convertable$ConversionSession.a(Convertable.java:614) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.world.level.storage.Convertable$ConversionSession.a(Convertable.java:607) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.level.WorldServer.saveIncrementally(WorldServer.java:1503) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1546) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1226) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at java.lang.Thread.run(Unknown Source) ~[?:?] minecraft | [07:00:22] [Server thread/ERROR]: Failed to save level ./worlds/Sensible minecraft | java.nio.file.AccessDeniedException: ./worlds/Sensible/level8177145930861822491.dat minecraft | at sun.nio.fs.UnixException.translateToIOException(Unknown Source) ~[?:?] minecraft | at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source) ~[?:?] minecraft | at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source) ~[?:?] minecraft | at sun.nio.fs.UnixFileSystemProvider.newByteChannel(Unknown Source) ~[?:?] minecraft | at java.nio.file.Files.newByteChannel(Unknown Source) ~[?:?] minecraft | at java.nio.file.Files.createFile(Unknown Source) ~[?:?] minecraft | at java.nio.file.TempFileHelper.create(Unknown Source) ~[?:?] minecraft | at java.nio.file.TempFileHelper.createTempFile(Unknown Source) ~[?:?] minecraft | at java.nio.file.Files.createTempFile(Unknown Source) ~[?:?] minecraft | at net.minecraft.world.level.storage.Convertable$ConversionSession.a(Convertable.java:614) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.world.level.storage.Convertable$ConversionSession.a(Convertable.java:607) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.level.WorldServer.saveIncrementally(WorldServer.java:1503) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1546) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1226) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-496] minecraft | at java.lang.Thread.run(Unknown Source) ~[?:?] minecraft | [07:03:25] [Folia Async Scheduler Thread #1/INFO]: Backup process has been finished successfully! minecraft | [07:03:26] [Server thread/INFO]: [STDOUT] [org.spigotmc.RestartCommand] Startup script './start.sh' does not exist! Stopping server. minecraft | [07:03:26] [Server thread/INFO]: Stopping server
Describe the way to reproduce the bug A zip file is still getting created, but the errors don't inspire confidence.