Staubgeborener / klipper-backup

Klipper backup script for manual or automated GitHub backups. Lightweight, pragmatic and comfortable.
https://klipperbackup.xyz
220 stars 46 forks source link

(RESOLVED) fatal: loose object, and related errors #77

Closed Bradford1040 closed 4 months ago

Bradford1040 commented 4 months ago

Code of Conduct

What happened

I had the backup set up on my main printer which I've used KIAUH on MX Linux (using SystemD kernel) it was working last month and now no longer works, I tried reinstalling on secondary printer and get the same error, following the install instructions to the letter, to make sure I had not done something wrong, I get the same error on the secondary system as I did the first, I have tried a few google search result fixes and nothing seems to fix the issue

What did you expect to happen

for the macro to backup my my config's to github

How to reproduce

just running it via macro or even running it via terminal script.sh

Additional information

No response

Staubgeborener commented 4 months ago

Please provide your .env file with hidden token and post some screenshots. I need to know the exact error message and the behavior so a screenshots is the best you can provide. Normally git takes care of itself about those git loose objects errors with garbage collection. You can bump this up by yourself: you go into you backup folder cd ~/config_backup and run git gc.

Bradford1040 commented 4 months ago

the hidden token removed or present? I mean I guess I can just remake a new one after I post the one I am using now?

Bradford1040 commented 4 months ago

Screenshot_2024-03-02_17-22-23

Bradford1040 commented 4 months ago

I used terminal to run the backup instead of using macro inside mainsail, thought it would have more info, guess it doesn't

Bradford1040 commented 4 months ago

Screenshot_2024-03-02_17-33-31 this is the second printer with fresh install and has the same error, there is NO folder 7E or file

Staubgeborener commented 4 months ago

Just the .env and do some xxx where the token is placed.

warning: adding embedded git repository: printer_ 1_data/config/klipper-macros

Interesting.

Bradford1040 commented 4 months ago

fatal: loose object 7e47384e1121e1110509f34bfd6e17b382398a3d (stored in .git/objects/7e/47384e1121e1110509f34bfd6e17b382398a3d) is corrupt

I have no clue where this file or folder is, or what it is?

Bradford1040 commented 4 months ago

Just the .env and do some xxx where the token is placed.

warning: adding embedded git repository: printer_ 1_data/config/klipper-macros

Interesting.

I jumped the gun lol, so will be making a new one lol, I included it

Staubgeborener commented 4 months ago

btw run git gc in your config_backup folder like is said, not in the klipper-backup folder.

Tylerjet commented 4 months ago

Could you try

cd ~
rm -rf config_backup

and then run the script again

Bradford1040 commented 4 months ago

cd into home? or into printer_1_data?

Tylerjet commented 4 months ago

cd into home

Tylerjet commented 4 months ago

what i think may be occuring is that your previous backups was using code from pre version 1.0 of klipper backup.

So the config_backup folder should be deleted entirely because it will have cached .git code that is no longer correct.

Bradford1040 commented 4 months ago

that did it, thank you, can't remember do I close the ticket or do you?

Tylerjet commented 4 months ago

You can close if resolved yep

Bradford1040 commented 4 months ago

might have been a KIAUH backup that messed everything up also, I'll look into that