Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Feature Requests
  3. Cloudron Backups to GitLab/GitHub Private Repos

Cloudron Backups to GitLab/GitHub Private Repos

Scheduled Pinned Locked Moved Feature Requests
backups
7 Posts 3 Posters 1.1k Views 3 Watching
  • 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.
    • marcusquinnM Offline
      marcusquinnM Offline
      marcusquinn
      wrote on last edited by girish
      #1

      I'm happy with the current paid backup options with their service levels that come with it - but it occurred to me that GitLab.com & GitHub.com both effectively offer unlimited storage for free, and Git Large File Support (LFS) now too.

      Inspired a little by this neat app that turns a Git Repo into a Dropbox/GDrive type service:

      • https://www.sparkleshare.org

      And since encrypted backups are an option, there's additional security.

      Not a high priority - but might be nice for both the really tight and multi-location/provider redundancy aims.

      Plus it's already a version-control system for historic records, so could help cover some of the legal compliance archiving of records needs for companies.

      Just a thought but maybe something in this?

      Web Design https://www.evergreen.je
      Development https://brandlight.org
      Life https://marcusquinn.com

      murgeroM girishG 2 Replies Last reply
      1
      • marcusquinnM marcusquinn

        I'm happy with the current paid backup options with their service levels that come with it - but it occurred to me that GitLab.com & GitHub.com both effectively offer unlimited storage for free, and Git Large File Support (LFS) now too.

        Inspired a little by this neat app that turns a Git Repo into a Dropbox/GDrive type service:

        • https://www.sparkleshare.org

        And since encrypted backups are an option, there's additional security.

        Not a high priority - but might be nice for both the really tight and multi-location/provider redundancy aims.

        Plus it's already a version-control system for historic records, so could help cover some of the legal compliance archiving of records needs for companies.

        Just a thought but maybe something in this?

        murgeroM Offline
        murgeroM Offline
        murgero
        App Dev
        wrote on last edited by murgero
        #2

        @marcusquinn I think if you choose "SSHFS Mount" in the options and throw in your gitlab repo credentials / path that it would probably work??? I am not 100% sure tho.

        Sike - Try this instead:

        1. Enable Filesystem as the backup Storage Provider
        2. Pick a path on your Cloudron HDD, something like /home/backups/gitlab
        3. Initialize it as a git repo: cd /home/backups/gitlab && git init && git remote add origin https://gitlab-server/username/repository
        4. Make sure to save the password in git as well: git config --global credential.helper store then pull the empty repo to store password. NOTE: you should use a randomly generated username and password as they will be stored in PLAINTEXT here.
        5. Put the following in crontab 00 23 * * * /home/backups/gitlab_script.sh
          Essentially this cron job runs everyday at 11PM server time.
        6. Put the following in /home/backups/gitlab_script.sh:
        #!/bin/bash
        
        ## Todays date
        NOW=$(date +"%m-%d-%Y")
        
        ## Change DIR to backups path
        cd /home/backups/gitlab
        
        ## Add changed files
        git add -A
        
        ## Add untracked (not tracked) files to git
        git add -u
        
        ## Commit to git
        git commit -m "Backup $NOW"
        
        ## Push to gitlab
        git push origin master
        

        that should do it, but note, it will take a long time to process.

        --
        https://urgero.org
        ~ Professional Nerd. Freelance Programmer. ~

        marcusquinnM 1 Reply Last reply
        1
        • murgeroM murgero

          @marcusquinn I think if you choose "SSHFS Mount" in the options and throw in your gitlab repo credentials / path that it would probably work??? I am not 100% sure tho.

          Sike - Try this instead:

          1. Enable Filesystem as the backup Storage Provider
          2. Pick a path on your Cloudron HDD, something like /home/backups/gitlab
          3. Initialize it as a git repo: cd /home/backups/gitlab && git init && git remote add origin https://gitlab-server/username/repository
          4. Make sure to save the password in git as well: git config --global credential.helper store then pull the empty repo to store password. NOTE: you should use a randomly generated username and password as they will be stored in PLAINTEXT here.
          5. Put the following in crontab 00 23 * * * /home/backups/gitlab_script.sh
            Essentially this cron job runs everyday at 11PM server time.
          6. Put the following in /home/backups/gitlab_script.sh:
          #!/bin/bash
          
          ## Todays date
          NOW=$(date +"%m-%d-%Y")
          
          ## Change DIR to backups path
          cd /home/backups/gitlab
          
          ## Add changed files
          git add -A
          
          ## Add untracked (not tracked) files to git
          git add -u
          
          ## Commit to git
          git commit -m "Backup $NOW"
          
          ## Push to gitlab
          git push origin master
          

          that should do it, but note, it will take a long time to process.

          marcusquinnM Offline
          marcusquinnM Offline
          marcusquinn
          wrote on last edited by
          #3

          @murgero Interesting, will give it a try and feedback here if it works as then it would be devs favourite solution; just be some notes added to the docs. 🙂👍

          Web Design https://www.evergreen.je
          Development https://brandlight.org
          Life https://marcusquinn.com

          murgeroM 1 Reply Last reply
          0
          • marcusquinnM marcusquinn

            @murgero Interesting, will give it a try and feedback here if it works as then it would be devs favourite solution; just be some notes added to the docs. 🙂👍

            murgeroM Offline
            murgeroM Offline
            murgero
            App Dev
            wrote on last edited by
            #4

            @marcusquinn Check my edit - much better solution.

            --
            https://urgero.org
            ~ Professional Nerd. Freelance Programmer. ~

            marcusquinnM 1 Reply Last reply
            1
            • murgeroM murgero

              @marcusquinn Check my edit - much better solution.

              marcusquinnM Offline
              marcusquinnM Offline
              marcusquinn
              wrote on last edited by
              #5

              @murgero Interesting - that covers it being multi-backups nicely too! Certainly one to try with caution for the CPU & Bandwidth though but good that it's a possibility.

              Web Design https://www.evergreen.je
              Development https://brandlight.org
              Life https://marcusquinn.com

              murgeroM 1 Reply Last reply
              0
              • marcusquinnM marcusquinn

                @murgero Interesting - that covers it being multi-backups nicely too! Certainly one to try with caution for the CPU & Bandwidth though but good that it's a possibility.

                murgeroM Offline
                murgeroM Offline
                murgero
                App Dev
                wrote on last edited by
                #6

                @marcusquinn It's only extra cost to resource is drive space, otherwise CPU and bandwidth usage is similar to other backup solution cloudron supports.

                --
                https://urgero.org
                ~ Professional Nerd. Freelance Programmer. ~

                1 Reply Last reply
                1
                • marcusquinnM marcusquinn

                  I'm happy with the current paid backup options with their service levels that come with it - but it occurred to me that GitLab.com & GitHub.com both effectively offer unlimited storage for free, and Git Large File Support (LFS) now too.

                  Inspired a little by this neat app that turns a Git Repo into a Dropbox/GDrive type service:

                  • https://www.sparkleshare.org

                  And since encrypted backups are an option, there's additional security.

                  Not a high priority - but might be nice for both the really tight and multi-location/provider redundancy aims.

                  Plus it's already a version-control system for historic records, so could help cover some of the legal compliance archiving of records needs for companies.

                  Just a thought but maybe something in this?

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #7

                  @marcusquinn said in Cloudron Backups to GitLab/GitHub Private Repos:

                  Not a high priority - but might be nice for both the really tight and multi-location/provider redundancy aims.

                  I have to think through the rest but multi-location backups is in our radar. We have a long pending issue about this https://git.cloudron.io/cloudron/box/-/issues/528

                  1 Reply Last reply
                  3
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Bookmarks
                    • Search