Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]access denied errors on backup #17

Closed
x0rtrunks opened this issue Apr 25, 2024 · 5 comments
Closed

[BUG]access denied errors on backup #17

x0rtrunks opened this issue Apr 25, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@x0rtrunks
Copy link

x0rtrunks commented Apr 25, 2024

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:

  • plugins
  • config

(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.

@x0rtrunks x0rtrunks added the bug Something isn't working label Apr 25, 2024
@DVDishka
Copy link
Owner

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

@DVDishka DVDishka pinned this issue Apr 28, 2024
@x0rtrunks
Copy link
Author

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.

@DVDishka
Copy link
Owner

DVDishka commented Apr 28, 2024

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

@x0rtrunks
Copy link
Author

Can the addDirectoryToBackup field also allow for backing up the files in the root of the main folder?

@DVDishka
Copy link
Owner

Do you mean the Minecraft server folder? If so I think yes, it depends on folder permissions

@DVDishka DVDishka unpinned this issue May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants