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

    Solved Is it possible to implement custom backup providers?

    Feature Requests
    backups cifs smbfs backblaze feature-request
    6
    13
    702
    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.
    • N
      nexbit last edited by girish

      Hi
      I see many requests on the forum regarding the support for "this" and "that" backup storage solution..
      Why not letting a power user (developer) implement their own backup provider, and then register it with cloudron CLI/API?

      For me this is a major show-stopper, because I don't want to be limited to what cloudron gives me today. I use several providers, like simple FTP(S) storage, SFTP, Backblaze B2 and others, and I'm ok with writing providers for these (and potentially sharing with the community).

      Bye
      P.

      1 Reply Last reply Reply Quote 0
      • girish
        girish Staff last edited by

        @nexbit It's possible to implement (probably takes a bit of time). https://git.cloudron.io/cloudron/box/tree/master/src/storage is the backend code for backups. See interface.js on what needs to be implemented for each backup backend. I think SFTP is probably not too hard to do - it has just not been requested enough. For B2, last I checked, there was no node module for this. https://github.com/cebollia/node-b2 has not seen updates in a while. I would in fact suggest that if you are interested in B2, simply start a new nodejs project that support file manipulation for the B2 API. We can then work together to implement the Cloudron backend (We can do the the Cloudron backend part).

        1 Reply Last reply Reply Quote 0
        • girish
          girish Staff last edited by

          I just found https://github.com/yakovkhalinsky/backblaze-b2 which seems active

          N 1 Reply Last reply Reply Quote 0
          • N
            nexbit @girish last edited by

            @girish said in Is it possible to implement custom backup providers?:

            I just found https://github.com/yakovkhalinsky/backblaze-b2 which seems active

            Yeah it seems fairly active and supported.. So it should be fairly simple to implement a B2 provider, taking the S3 one and adapting for B2, right?
            Regarding the box repo, is it possible to maintain a customized clone and use that on a server instead of the official one? I know that such setup can't be officially supported, and can be potentially dangerous, but it can be useful for some advanced customizations or testing of new functionality.

            Thx for your support,
            P.

            A 1 Reply Last reply Reply Quote 0
            • F
              fourspace last edited by

              @girish Any information if SFTP will become an official backup storage solution? If so, do you have any ETA?
              I want to do backups to a Hetzner Storage Box.

              1 Reply Last reply Reply Quote 2
              • A
                adrw @nexbit last edited by

                @girish @nexbit Any update on Backblaze B2 backup target? If there's a branch with progress I could put some time towards finishing it. I'm also a developer and am eager to have native Backblaze B2 support. The b2 node library and existing backup target interface linked above looks helpfully straight forward.

                1 Reply Last reply Reply Quote 2
                • girish
                  girish Staff last edited by

                  @fourspace For Hetzner storage box, just mount it via SMB - https://cloudron.io/documentation/backups/#sambacifs

                  @adrw We haven't worked on the B2 backend. If you want to hack on it, first step is to just create a separate project that implements our storage interface -https://git.cloudron.io/cloudron/box/blob/master/src/storage/interface.js . You can see the other backend providers as to how it's implemented (same directory). I am afraid there are no more docs that the code itself. If we have a standalone project that implements the interface (roughly), it's easier for us to integrate it into cloudron.

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    adrw @girish last edited by

                    @girish Thanks for the path forward, I'll post back when I have some chance to hack on it and get an implemented Backblaze B2 interface working.

                    1 Reply Last reply Reply Quote 1
                    • girish
                      girish Staff last edited by

                      @adrw Thanks! You can join our chat if you need any help.

                      1 Reply Last reply Reply Quote 2
                      • girish
                        girish Staff last edited by

                        We put in SSHFS/CIFS in 5.3. B2 support is in 5.4

                        M 1 Reply Last reply Reply Quote 1
                        • M
                          msbt App Dev @girish last edited by

                          @girish what's the advantage of using the cifs method over filesystem? I've been using hetzner storagebox mounts for months (as fs), what is different when I change to cifs?

                          1 Reply Last reply Reply Quote 1
                          • nebulon
                            nebulon Staff last edited by

                            Currently the main advantage is, that it checks if the filesystem is mounted prior starting the backup. This prevents situations where for some reason the mountpoint got unmounted (ie. network errors) and the regular filesystem backup provider would then use that mountpoint, which is now just a regular folder on the / disk, and put the backups there.
                            Also backup permissions are dealt with a bit differently, since the uid/gid are set with the mount options.

                            1 Reply Last reply Reply Quote 1
                            • M
                              msbt App Dev last edited by

                              good points, thanks, gonna switch to cifs then! 🙂

                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post
                              Powered by NodeBB