pcal43 / fastback

Fast, incremental Minecraft world backups. Powered by Git.
https://pcal43.github.io/fastback/
GNU General Public License v2.0
127 stars 19 forks source link

Not able to restore local backups. #273

Closed Wiper-R closed 1 year ago

Wiper-R commented 1 year ago

I am getting a wierd error. Can I restore using git commands without ruining the whole world?

backup restore 2023-09-06_21-17-23
[18:26:42] [pool-3-thread-2/INFO]: An unexpected backup error occurred. See log for details.
[18:26:42] [pool-3-thread-2/ERROR]: org.eclipse.jgit.api.errors.FilterFailedException: Execution of filter command 'git-lfs smudge -- 'DIM-1/data/raids.dat'' on file 'DIM-1/data/raids.dat' failed with return code '2', message on stderr: 'Downloading 'DIM-1/data/raids.dat' (90 B)
Error downloading object: 'DIM-1/data/raids.dat' (f0281e3): Smudge error: Error downloading 'DIM-1/data/raids.dat' (f0281e3c5ee35debaa3719eec2901032d95f0065c8cd336cb642826de84b9a87): EOF

Errors logged to 'C:\Users\rshiv\AppData\Local\Temp\fastback-restore1644152027490682198\world-2023-09-06_21-17-23\.git\lfs\logs\20230907T182642.8004342.log'.
Use `git lfs logs last` to view the log.
'
org.eclipse.jgit.api.errors.JGitInternalException: org.eclipse.jgit.api.errors.FilterFailedException: Execution of filter command 'git-lfs smudge -- 'DIM-1/data/raids.dat'' on file 'DIM-1/data/raids.dat' failed with return code '2', message on stderr: 'Downloading 'DIM-1/data/raids.dat' (90 B)
Error downloading object: 'DIM-1/data/raids.dat' (f0281e3): Smudge error: Error downloading 'DIM-1/data/raids.dat' (f0281e3c5ee35debaa3719eec2901032d95f0065c8cd336cb642826de84b9a87): EOF

Errors logged to 'C:\Users\rshiv\AppData\Local\Temp\fastback-restore1644152027490682198\world-2023-09-06_21-17-23\.git\lfs\logs\20230907T182642.8004342.log'.
Use `git lfs logs last` to view the log.
'
        at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:223) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at net.pcal.fastback.repo.RestoreUtils.jgit_restoreSnapshot(RestoreUtils.java:65) ~[fastback-0.15.3+1.20.1-fabric.jar:?]
        at net.pcal.fastback.repo.RestoreUtils.restoreSnapshot(RestoreUtils.java:50) ~[fastback-0.15.3+1.20.1-fabric.jar:?]
        at net.pcal.fastback.repo.RepoImpl.doRestoreSnapshot(RepoImpl.java:167) ~[fastback-0.15.3+1.20.1-fabric.jar:?]
        at net.pcal.fastback.commands.RestoreCommand.lambda$restore$0(RestoreCommand.java:64) ~[fastback-0.15.3+1.20.1-fabric.jar:?]
        at net.pcal.fastback.commands.Commands.lambda$gitOp$0(Commands.java:125) ~[fastback-0.15.3+1.20.1-fabric.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1623) ~[?:?]
Caused by: java.io.IOException: org.eclipse.jgit.api.errors.FilterFailedException: Execution of filter command 'git-lfs smudge -- 'DIM-1/data/raids.dat'' on file 'DIM-1/data/raids.dat' failed with return code '2', message on stderr: 'Downloading 'DIM-1/data/raids.dat' (90 B)
Error downloading object: 'DIM-1/data/raids.dat' (f0281e3): Smudge error: Error downloading 'DIM-1/data/raids.dat' (f0281e3c5ee35debaa3719eec2901032d95f0065c8cd336cb642826de84b9a87): EOF

Errors logged to 'C:\Users\rshiv\AppData\Local\Temp\fastback-restore1644152027490682198\world-2023-09-06_21-17-23\.git\lfs\logs\20230907T182642.8004342.log'.
Use `git lfs logs last` to view the log.
'
        at org.eclipse.jgit.dircache.DirCacheCheckout.runExternalFilterCommand(DirCacheCheckout.java:1718) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.dircache.DirCacheCheckout.getContent(DirCacheCheckout.java:1679) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.dircache.DirCacheCheckout.getContent(DirCacheCheckout.java:1609) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1535) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:569) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:471) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.api.CloneCommand.checkout(CloneCommand.java:399) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:220) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        ... 10 more
Caused by: org.eclipse.jgit.api.errors.FilterFailedException: Execution of filter command 'git-lfs smudge -- 'DIM-1/data/raids.dat'' on file 'DIM-1/data/raids.dat' failed with return code '2', message on stderr: 'Downloading 'DIM-1/data/raids.dat' (90 B)
Error downloading object: 'DIM-1/data/raids.dat' (f0281e3): Smudge error: Error downloading 'DIM-1/data/raids.dat' (f0281e3c5ee35debaa3719eec2901032d95f0065c8cd336cb642826de84b9a87): EOF

Errors logged to 'C:\Users\rshiv\AppData\Local\Temp\fastback-restore1644152027490682198\world-2023-09-06_21-17-23\.git\lfs\logs\20230907T182642.8004342.log'.
Use `git lfs logs last` to view the log.
'
        at org.eclipse.jgit.dircache.DirCacheCheckout.runExternalFilterCommand(DirCacheCheckout.java:1721) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.dircache.DirCacheCheckout.getContent(DirCacheCheckout.java:1679) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.dircache.DirCacheCheckout.getContent(DirCacheCheckout.java:1609) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1535) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:569) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:471) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.api.CloneCommand.checkout(CloneCommand.java:399) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:220) ~[org_eclipse_jgit_org_eclipse_jgi305301015-r-21467da5ca38ff49.jar:?]
        ... 10 more
Wiper-R commented 1 year ago

I used git reset --hard and it worked, but why the backup restore was not working?

pcal43 commented 1 year ago

Tough to say. It looks like you had LFS configured globally and that caused the builtin jgit git to start trying to do it's version of lfs, which is a little weird and doesn't seem to work all that well. More recent versions of fastback disable lfs in the repo locally even if you have it enabled globally.

pcal43 commented 1 year ago

But really I'm going to deprecate the jgit-based mode entirely and basically require everyone to use the newer 'native git' mode: https://pcal43.github.io/fastback/

pcal43 commented 1 year ago

...there was also a bug here. should be fixed in latest version. thanks for the report.