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

[Bug]: #83

Closed 3DeezNutz closed 2 months ago

3DeezNutz commented 3 months ago

Code of Conduct

What happened

I tried updating and im getting this error. image

What did you expect to happen

just to update my back up files.

How to reproduce

just hit the gitupdate macro.

Additional information

image

Tylerjet commented 3 months ago

I had this happen but not really sure why it occurs what you can try is going into the config_backup folder via ssh and running git pull and i believe that should be able to un corrupt the repo.

I've been attempting to reproduce the error or sort out what causes it to occur but no luck yet.

3DeezNutz commented 3 months ago

What do you mean by git pull? I’m not very good at this.

On Mon, Mar 11, 2024 at 7:53 PM MrTylerjet @.***> wrote:

I had this happen but not really sure why it occurs what you can try is going into the config_backup folder via ssh and running git pull and i believe that should be able to un corrupt the repo

— Reply to this email directly, view it on GitHub https://github.com/Staubgeborener/klipper-backup/issues/83#issuecomment-1989711667, or unsubscribe https://github.com/notifications/unsubscribe-auth/BE2CUOILZPOFDQ3RNV7ITXDYXZNZ5AVCNFSM6AAAAABERJHGLOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBZG4YTCNRWG4 . You are receiving this because you authored the thread.Message ID: @.***>

Tylerjet commented 3 months ago

git pull is a command, once logged into the PC running klipper you will want to do:

cd config_backup

and then

git pull

and see what errors occur if any

3DeezNutz commented 3 months ago

image

like this?

Tylerjet commented 3 months ago

yep ok so try this instead

git init

and then

git pull
3DeezNutz commented 3 months ago

image

Tylerjet commented 3 months ago

ahh ok i found the list of commands i did:

rm -rf .git/objects
git init
git reset --hard
git status

The last command should either show up to date or that there are deleted files but you shouldn't see the loose object error

3DeezNutz commented 3 months ago

image

Tylerjet commented 3 months ago

could you try a git pull again what shows up

3DeezNutz commented 3 months ago

ok thank you that fixed it

3DeezNutz commented 3 months ago

how would i go about backing up my history on mainsail?

Tylerjet commented 3 months ago

Not sure what you mean are you referring to the the mainsail.cfg file? that is a read only file and can't be modified in the editor so it is skipped from backups.

3DeezNutz commented 3 months ago

like all the data from your total print hours. image

Tylerjet commented 3 months ago

That data is saved in a database specific to moonraker and has a bit more involved process to backup the data base to be able to restore it if needed later.

3DeezNutz commented 3 months ago

Could this be a future request feature?

On Mon, Mar 11, 2024 at 8:28 PM MrTylerjet @.***> wrote:

That data is saved in a database specific to moonraker and has a bit more involved process to backup the data base to be able to restore it if needed later.

— Reply to this email directly, view it on GitHub https://github.com/Staubgeborener/klipper-backup/issues/83#issuecomment-1989740632, or unsubscribe https://github.com/notifications/unsubscribe-auth/BE2CUOKDJ4WG7JSTHVPRGDLYXZR37AVCNFSM6AAAAABERJHGLOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBZG42DANRTGI . You are receiving this because you authored the thread.Message ID: @.***>

Staubgeborener commented 3 months ago

Maybe, it's possible to backup and restore the moonraker database. We could add a simple ~/moonraker/scripts/backup-database.sh -o ~/moonraker-database.backup command line in future (code) which can be toggled with a backup_database parameter (or something like that) in future. Right now you can backup this database by yourself and add the path to the data.mdb file in your .env.

3DeezNutz commented 3 months ago

Do I use single file?

On Wed, Mar 13, 2024 at 5:46 AM Staubgeborener @.***> wrote:

Maybe, it's possible to backup and restore https://moonraker.readthedocs.io/en/latest/installation/#lmdb-database-backup-and-restore the moonraker database. We could add a simple ~/moonraker/scripts/backup-database.sh -o ~/moonraker-database.backup command line in future (code https://github.com/Arksine/moonraker/blob/master/scripts/backup-database.sh) which can be toggled with a backup_database parameter (or something like that) in future. Right now you can backup this database by yourself and add the path to the data.mdb file in your .env.

— Reply to this email directly, view it on GitHub https://github.com/Staubgeborener/klipper-backup/issues/83#issuecomment-1994089344, or unsubscribe https://github.com/notifications/unsubscribe-auth/BE2CUOPVREMMEDKS2SAFJY3YYAVAJAVCNFSM6AAAAABERJHGLOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJUGA4DSMZUGQ . You are receiving this because you authored the thread.Message ID: @.***>

Staubgeborener commented 3 months ago

What.

3DeezNutz commented 3 months ago

do i use this but add the data.mdb path image

Staubgeborener commented 3 months ago

Yes. If you run the backup like this ~/moonraker/scripts/backup-database.sh -o ~/moonraker-database.backup You create the backup file of your database in your home directory.

So basically adding something like this in your .env is enough: path_moonrakerdatabase=moonraker-database.backup

I would suggest to create the database backup in a extra directory and not in your home directory. After pushing all files to GitHub so you avoid disorganization in your repository.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] commented 2 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.