DVDishka / Backuper

Minecraft backup plugin for Paper/Folia servers with FTP/SFTP support
MIT License
18 stars 5 forks source link

[Support] Backups failing #9

Closed slaapzzz closed 8 months ago

slaapzzz commented 9 months ago

Everytime the auto-scheduled backup tries to backup my world it fails. But when I run the command it works just fine. Any help?

[10:25:10 INFO]: [Backuper] Backup process has been started [10:26:52 ERROR]: Failed to save level ./world java.nio.file.AccessDeniedException: ./world/level12129492956281235418.dat at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?] at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218) ~[?:?] at java.nio.file.Files.newByteChannel(Files.java:380) ~[?:?] at java.nio.file.Files.createFile(Files.java:658) ~[?:?] at java.nio.file.TempFileHelper.create(TempFileHelper.java:136) ~[?:?] at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:159) ~[?:?] at java.nio.file.Files.createTempFile(Files.java:878) ~[?:?] at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveLevelData(LevelStorageSource.java:614) ~[?:?] at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveDataTag(LevelStorageSource.java:607) ~[?:?] at net.minecraft.server.level.ServerLevel.saveIncrementally(ServerLevel.java:1503) ~[?:?] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1536) ~[paper-1.20.4.jar:git-Paper-430] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1216) ~[paper-1.20.4.jar:git-Paper-430] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-430] at java.lang.Thread.run(Thread.java:840) ~[?:?] [10:26:52 ERROR]: Failed to save level ./world_nether java.nio.file.AccessDeniedException: ./world_nether/level14966274231964192496.dat at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?] at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218) ~[?:?] at java.nio.file.Files.newByteChannel(Files.java:380) ~[?:?] at java.nio.file.Files.createFile(Files.java:658) ~[?:?] at java.nio.file.TempFileHelper.create(TempFileHelper.java:136) ~[?:?] at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:159) ~[?:?] at java.nio.file.Files.createTempFile(Files.java:878) ~[?:?] at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveLevelData(LevelStorageSource.java:614) ~[?:?] at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveDataTag(LevelStorageSource.java:607) ~[?:?] at net.minecraft.server.level.ServerLevel.saveIncrementally(ServerLevel.java:1503) ~[?:?] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1536) ~[paper-1.20.4.jar:git-Paper-430] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1216) ~[paper-1.20.4.jar:git-Paper-430] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-430] at java.lang.Thread.run(Thread.java:840) ~[?:?] [10:26:52 ERROR]: Failed to save level ./world_the_end java.nio.file.AccessDeniedException: ./world_the_end/level14422186950764156848.dat at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?] at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218) ~[?:?] at java.nio.file.Files.newByteChannel(Files.java:380) ~[?:?] at java.nio.file.Files.createFile(Files.java:658) ~[?:?] at java.nio.file.TempFileHelper.create(TempFileHelper.java:136) ~[?:?] at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:159) ~[?:?] at java.nio.file.Files.createTempFile(Files.java:878) ~[?:?] at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveLevelData(LevelStorageSource.java:614) ~[?:?] at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveDataTag(LevelStorageSource.java:607) ~[?:?] at net.minecraft.server.level.ServerLevel.saveIncrementally(ServerLevel.java:1503) ~[?:?] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1536) ~[paper-1.20.4.jar:git-Paper-430] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1216) ~[paper-1.20.4.jar:git-Paper-430] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-430] at java.lang.Thread.run(Thread.java:840) ~[?:?]

DVDishka commented 9 months ago

This is usually due to the fact that the server was once shut down during the backup. You need to go to the server folder and enable writing option in the world, world_nether and world_the_end folders by going to the settings of these folders (right-click on the folders).

DVDishka commented 9 months ago

Let me know if you couldn't figure it out

slaapzzz commented 9 months ago

Also came to the same conclusion after I posted this. I changed the permission code to 777 so when the auto backup tries again in a couple hours I'll lyk. I don't want to change anything with the timing to keep the testing consistent.

DVDishka commented 9 months ago

So have you tested it?

slaapzzz commented 9 months ago

Sorry been a little busy. Seems to be working now. Thanks!

slaapzzz commented 8 months ago

Hey again, it seems like pterodactyl keeps changing the permission from 777 to 755 after a couple hours. I asked in the official discord but it so far seems to be no help. Was hoping you know how to fix this

DVDishka commented 8 months ago

With 755 does the same error appear?

DVDishka commented 8 months ago

Backuper changes the permissions on the folder so that everything goes well during the backup, but afterwards it returns the permissions

DVDishka commented 8 months ago

Please send me your config, server core and OS

DVDishka commented 8 months ago

And your world folder weight

slaapzzz commented 8 months ago

Im currently not home but once I do get home Ill send you everything you need. The error does occur when the files permission code is 755. Also where can I find the server core and world folder weight. The os is ubuntu 22.04.3

DVDishka commented 8 months ago

You can see the weight of the world folder by right-clicking on the folder

slaapzzz commented 8 months ago

I still could not find the weight of the folder or the server core. Heres the config https://easyupload.io/yemi3x

DVDishka commented 8 months ago

Can you send the config just text, not a link to the file?

slaapzzz commented 8 months ago

DO NOT CHANGE

configVersion: 5.0 lastBackup: 1709058690 lastChange: 1709042061

Automatic backup once in a specified period

autoBackup: true

Full directory where backups will be stored

backupsFolder: plugins/Backuper/Backups

Backup time (0 - 23). Backups will be made at this time every day. (backupPeriod will be automatically set to 24 hours). -1 to disable backup time fixation

backupTime: -1

Backup period in MINUTES. To change this value you need to set backupTime to -1

backupPeriod: 480

What to do after backup, (STOP, RESTART, NOTHING)

afterBackup: NOTHING

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

Max backups in backups folder, 0 to make it unlimited

maxBackupsNumber: 0

Max backups folder weight in MB, 0 to make it unlimited

maxBackupsWeight: 0

Should backups be packaged in a zip archive

zipArchive: true

Better logging

betterLogging: false

DVDishka commented 8 months ago

I can see the line: [10:25:10 INFO]: [Backuper] Backup process has been started but is there the line "Backup process has been finished" somewhere after an error?

slaapzzz commented 8 months ago

sorry idk what happened to the whole message. here's the whole thing

[10:25:10] [Server thread/INFO]: [Backuper] Backup process has been started [10:26:52] [Server thread/ERROR]: Failed to save level ./world java.nio.file.AccessDeniedException: ./world/level12129492956281235418.dat at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?] at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218) ~[?:?] at java.nio.file.Files.newByteChannel(Files.java:380) ~[?:?] at java.nio.file.Files.createFile(Files.java:658) ~[?:?] at java.nio.file.TempFileHelper.create(TempFileHelper.java:136) ~[?:?] at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:159) ~[?:?] at java.nio.file.Files.createTempFile(Files.java:878) ~[?:?] at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveLevelData(LevelStorageSource.java:614) ~[?:?] at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveDataTag(LevelStorageSource.java:607) ~[?:?] at net.minecraft.server.level.ServerLevel.saveIncrementally(ServerLevel.java:1503) ~[?:?] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1536) ~[paper-1.20.4.jar:git-Paper-430] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1216) ~[paper-1.20.4.jar:git-Paper-430] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-430] at java.lang.Thread.run(Thread.java:840) ~[?:?] [10:26:52] [Server thread/ERROR]: Failed to save level ./world_nether java.nio.file.AccessDeniedException: ./world_nether/level14966274231964192496.dat at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?] at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218) ~[?:?] at java.nio.file.Files.newByteChannel(Files.java:380) ~[?:?] at java.nio.file.Files.createFile(Files.java:658) ~[?:?] at java.nio.file.TempFileHelper.create(TempFileHelper.java:136) ~[?:?] at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:159) ~[?:?] at java.nio.file.Files.createTempFile(Files.java:878) ~[?:?] at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveLevelData(LevelStorageSource.java:614) ~[?:?] at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveDataTag(LevelStorageSource.java:607) ~[?:?] at net.minecraft.server.level.ServerLevel.saveIncrementally(ServerLevel.java:1503) ~[?:?] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1536) ~[paper-1.20.4.jar:git-Paper-430] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1216) ~[paper-1.20.4.jar:git-Paper-430] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-430] at java.lang.Thread.run(Thread.java:840) ~[?:?] [10:26:52] [Server thread/ERROR]: Failed to save level ./world_the_end java.nio.file.AccessDeniedException: ./world_the_end/level14422186950764156848.dat at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?] at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218) ~[?:?] at java.nio.file.Files.newByteChannel(Files.java:380) ~[?:?] at java.nio.file.Files.createFile(Files.java:658) ~[?:?] at java.nio.file.TempFileHelper.create(TempFileHelper.java:136) ~[?:?] at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:159) ~[?:?] at java.nio.file.Files.createTempFile(Files.java:878) ~[?:?] at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveLevelData(LevelStorageSource.java:614) ~[?:?] at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveDataTag(LevelStorageSource.java:607) ~[?:?] at net.minecraft.server.level.ServerLevel.saveIncrementally(ServerLevel.java:1503) ~[?:?] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1536) ~[paper-1.20.4.jar:git-Paper-430] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1216) ~[paper-1.20.4.jar:git-Paper-430] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-430] at java.lang.Thread.run(Thread.java:840) ~[?:?] [10:27:00] [Folia Async Scheduler Thread #0/INFO]: [Backuper] Backup process has been finished successfully! [15:24:55] [Server thread/INFO]: [Backuper] Backup process has been started [15:26:45] [Folia Async Scheduler Thread #1/INFO]: [Backuper] Backup process has been finished successfully!

DVDishka commented 8 months ago

Ok, thanks for your report, but I have to say that its not really an error. Backuper prevents world folders from modifying during the backup process because it might break your backup, so just ignore this error

slaapzzz commented 8 months ago

Ok I see, sorry for the trouble