• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

So I have a question about backup

Scheduled Pinned Locked Moved General Discussion
24 Posts 6 Posters 6.1k Views 5 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 Offline
    sdetweil @Ray
    last edited by Nov 29, 2021, 3:35 PM

    @ray i created two scripts mm_backup and mm_restore
    you can get them here

    they write/read from a folder (defaults to ~/MM_backup )

    using ~/MagicMirror as the source (default)

    (but take parms to change the names) see mm_backup.sh -h

    this creates a git repository of the 2 files and creates a tag (label) for the instance of the backup.

    you should create a (free) private repo (to keep any config settings private) on github and push the local repo there to have an offline backup
    then u can clone it anytime and restore from the appropriate tag (date/time)

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    M R 2 Replies Last reply Nov 29, 2021, 5:24 PM Reply Quote 0
    • M Offline
      mumblebaj Module Developer @sdetweil
      last edited by mumblebaj Nov 29, 2021, 5:25 PM Nov 29, 2021, 5:24 PM

      @sdetweil
      Hi Sam. Here? I checked your Github and nothing there either. Or maybe I am missed it?

      Check out my modules at: https://github.com/mumblebaj?tab=repositories

      S 1 Reply Last reply Nov 29, 2021, 5:26 PM Reply Quote 0
      • S Offline
        sdetweil @mumblebaj
        last edited by Nov 29, 2021, 5:26 PM

        @mumblebaj doah!!.. forgot the link

        https://github.com/sdetweil/MagicMirror-backup-restore

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        M 2 Replies Last reply Nov 29, 2021, 5:29 PM Reply Quote 0
        • M Offline
          mumblebaj Module Developer @sdetweil
          last edited by Nov 29, 2021, 5:29 PM

          @sdetweil Awesome. Thanks Sam. Always nice work from you.

          Check out my modules at: https://github.com/mumblebaj?tab=repositories

          1 Reply Last reply Reply Quote 0
          • M Offline
            mumblebaj Module Developer @sdetweil
            last edited by Nov 29, 2021, 6:09 PM

            @sdetweil When I ran the mm_backup.sh I saw this error but it created the output in the MM_backup folder as expected.

            usage: git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [<directory>]
            
                --template <template-directory>
                                      directory from which templates will be used
                --bare                create a bare repository
                --shared[=<permissions>]
                                      specify that the git repository is to be shared amongst several users
                -q, --quiet           be quiet
                --separate-git-dir <gitdir>
                                      separate git dir from working tree
            

            Is this because of some options that I did not specify? After the output was created I just manually pushed to a private directory on git.

            Check out my modules at: https://github.com/mumblebaj?tab=repositories

            S 2 Replies Last reply Nov 29, 2021, 6:14 PM Reply Quote 0
            • S Offline
              sdetweil @mumblebaj
              last edited by sdetweil Nov 29, 2021, 6:50 PM Nov 29, 2021, 6:14 PM

              @mumblebaj probably git version before 2.28

              the primary branch name option didn’t come in til 2.28. 0

              i have

              git --version
              git version 2.34.1
              

              I will add a check…

              to upgrade git (don’t do it for these scripts… I have fixed the script to not need this capability, just documenting how)

              sudo add-apt-repository -y ppa:git-core/ppa
              sudo apt update
              sudo apt install git -y
              

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              M 1 Reply Last reply Nov 29, 2021, 6:37 PM Reply Quote 0
              • S Offline
                sdetweil @mumblebaj
                last edited by sdetweil Nov 29, 2021, 6:33 PM Nov 29, 2021, 6:22 PM

                @mumblebaj I pushed a change to set the primary branch name a different way…

                give it a try

                backup to some other folder (and then u can delete that folder)

                ./mm_backup.sh -b somefolder
                

                just pushed a change to create the output folder if it doesn’t exist, instead of error…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                M 1 Reply Last reply Nov 29, 2021, 6:33 PM Reply Quote 0
                • M Offline
                  mumblebaj Module Developer @sdetweil
                  last edited by Nov 29, 2021, 6:33 PM

                  @sdetweil Awesome. That was clean.

                  Check out my modules at: https://github.com/mumblebaj?tab=repositories

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mumblebaj Module Developer @sdetweil
                    last edited by Nov 29, 2021, 6:37 PM

                    @sdetweil My git version is 2.20.1. Guess I need to update it.

                    Check out my modules at: https://github.com/mumblebaj?tab=repositories

                    S 1 Reply Last reply Nov 29, 2021, 6:37 PM Reply Quote 0
                    • S Offline
                      sdetweil @mumblebaj
                      last edited by Nov 29, 2021, 6:37 PM

                      @mumblebaj said in So I have a question about backup:

                      Guess I need to update it.

                      only if u need something

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      M 1 Reply Last reply Nov 29, 2021, 6:39 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 2 / 3
                      2 / 3
                      • First post
                        11/24
                        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