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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Cloudron Backups to GitLab/GitHub Private Repos

    Feature Requests
    backups
    3
    7
    75
    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.
    • marcusquinn
      marcusquinn last edited by girish

      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?

      We're not here for a long time - but we are here for a good time :)
      Jersey/UK
      Work & Ecommerce Advice: https://brandlight.org
      Personal & Software Tips: https://marcusquinn.com

      murgero girish 2 Replies Last reply Reply Quote 1
      • murgero
        murgero App Dev @marcusquinn last edited by 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.

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

        marcusquinn 1 Reply Last reply Reply Quote 1
        • marcusquinn
          marcusquinn @murgero last edited by

          @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. 🙂👍

          We're not here for a long time - but we are here for a good time :)
          Jersey/UK
          Work & Ecommerce Advice: https://brandlight.org
          Personal & Software Tips: https://marcusquinn.com

          murgero 1 Reply Last reply Reply Quote 0
          • murgero
            murgero App Dev @marcusquinn last edited by

            @marcusquinn Check my edit - much better solution.

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

            marcusquinn 1 Reply Last reply Reply Quote 1
            • marcusquinn
              marcusquinn @murgero last edited by

              @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.

              We're not here for a long time - but we are here for a good time :)
              Jersey/UK
              Work & Ecommerce Advice: https://brandlight.org
              Personal & Software Tips: https://marcusquinn.com

              murgero 1 Reply Last reply Reply Quote 0
              • murgero
                murgero App Dev @marcusquinn last edited by

                @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 Reply Quote 1
                • girish
                  girish Staff @marcusquinn last edited by

                  @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 Reply Quote 3
                  • First post
                    Last post
                  Powered by NodeBB