MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MagicMirror-backup-restore

    Scheduled Pinned Locked Moved Solved Troubleshooting
    7 Posts 2 Posters 44 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Do not disturb
      sdetweil @rkorell
      last edited by sdetweil

      @rkorell thanks.

      Hm.
      If I git remote on the backup folder.
      And git branch on the folder and
      they are different what do you think I should do

      What is the right branch?

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      R 1 Reply Last reply Reply Quote 0
      • R Offline
        rkorell @sdetweil
        last edited by rkorell

        Dear Sam, @sdetweil ,

        sorry for the late reply — time zones 😊 (it was night here in Germany when you posted).

        To answer your question: the right branch is main.
        That’s where mm_backup.sh pushes to
        (git push -f origin main) , and that’s where backups should live.

        The problem is that mm_restore.sh creates and checks out a “restore”-branch but never switches back (to main) or deletes “restore” afterwards. So after a restore, the local repo stays on restore-branch.

        When mm_backup.sh runs next, it does git add and git commit — which goes to the currently checked-out branch (restore-branch), but then pushes main. So the new backup commit is “lost” on the wrong branch.

        I think the simplest fix would be to add a git checkout main at the beginning of mm_backup.sh,
        before any git operations. That way it always commits to the right branch regardless of what
        happened before.

        Alternatively, mm_restore.sh could clean up after itself by switching back to main and deleting
        restore-branch when it’s done.

        Thanks for looking into it!

        Warmest regards,
        Ralf

        S 1 Reply Last reply Reply Quote 0
        • S Do not disturb
          sdetweil @rkorell
          last edited by

          @rkorell no sorry needed. We all respond when we can

          Got it. Both scripts are broken

          Backup for not checking and correcting
          Restore for not cleaning up

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          R 1 Reply Last reply Reply Quote 1
          • R Offline
            rkorell @sdetweil
            last edited by

            @sdetweil OK; cool! Thanks again for all your effort!

            Warmest regards,
            Ralf

            S 1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil @rkorell
              last edited by sdetweil

              @rkorell I have pushed fixes for both scripts to handle this error in the previous versions…

              both backup and restore will handle the case where the restore-branch exists (as now)
              and cleanup after…

              thanks for the report and feedback

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              R 1 Reply Last reply Reply Quote 1
              • R Offline
                rkorell @sdetweil
                last edited by

                @sdetweil resolved in less than 24 hours :-) This is “responsive” !
                Thanks again!
                Ralf

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy