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 Google Drive for Backup & as binded Local Storage

    Discuss
    backups google drive
    7
    22
    1098
    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.
    • J
      jagan last edited by girish

      Hi!
      I have access to unlimited drive storage on google suite for education.
      I wonder how I can take advantage of this to:

      1. Backup my cloudron
      2. Bind Google Drive or a folder as a drive to use as an external drive for data storage in the upcoming 6.0 version (ref. What's coming in 6.0 (take 2): Volume management - this will allow mounting paths on the host into apps.)

      Presently, I use wasabi for backups. I don't see Google Drive in the Storage Provider list. If it is feasible, can we propose to add Google Drive as an option for Backup?

      What is the latest about using rclone to mount a drive as local filesystem in cloudron please?

      Thank you!

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

        @jagan said in Google Drive for Backup & as binded Local Storage:

        Bind Google Drive or a folder as a drive

        If you mount Google Drive via FUSE, then you can just set that path as the backup folder under Backups view. You don't need the 6.0 feature, that one is for mounting host paths into apps.

        mdreira 1 Reply Last reply Reply Quote 0
        • mdreira
          mdreira translator @girish last edited by

          @girish I have mounted my google drive with rclone in Cloudron server, but when I backup there, cloudron doesn't see it in their backup list.

          The backup is done perfectly and I can see it on my google drive, but it doesn't appear in the Cloudron backup list, so I can't use it.

          robi girish 2 Replies Last reply Reply Quote 0
          • robi
            robi @mdreira last edited by

            @mdreira said in Google Drive for Backup & as binded Local Storage:

            @girish I have mounted my google drive with rclone in Cloudron server, but when I backup there, cloudron doesn't see it in their backup list.

            Oh, this would be good to investigate. Have any logs to share?

            Life of Advanced Technology

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

              @mdreira said in Google Drive for Backup & as binded Local Storage:

              The backup is done perfectly and I can see it on my google drive, but it doesn't appear in the Cloudron backup list, so I can't use it.

              Usually, this means the backup didn't actually succeed. Can you please put the logs at https://paste.cloudron.io and put the link here?

              mdreira 1 Reply Last reply Reply Quote 1
              • mdreira
                mdreira translator @girish last edited by

                @girish You're right, the backups weren't done correctly. 😅

                1 Reply Last reply Reply Quote 0
                • E
                  eddowding last edited by

                  I'd vote for this too!

                  martinkbs 1 Reply Last reply Reply Quote 0
                  • martinkbs
                    martinkbs @eddowding last edited by

                    @eddowding As @mdreira has already commented, you just have to mount the Google Drive you want to use in the system folder with rClone and the backup system will work without problems.

                    Captura de pantalla 2021-12-13 a las 21.22.28.png

                    Captura de pantalla 2021-12-13 a las 21.24.03.png

                    robi 1 Reply Last reply Reply Quote 2
                    • robi
                      robi @martinkbs last edited by

                      @martinkbs Have you tried it with shared folders?

                      Life of Advanced Technology

                      martinkbs 1 Reply Last reply Reply Quote 0
                      • martinkbs
                        martinkbs @robi last edited by

                        @robi The screenshot of Drive that you see is a shared drive 😛

                        E 1 Reply Last reply Reply Quote 2
                        • E
                          eddowding @martinkbs last edited by

                          @martinkbs a detailed how-to guide would be wonderful here, if you can help.

                          I've mounted using rclone by following this guide: https://rclone.org/drive/

                          But I'm not clear on then how to have cloudron see that as a volume. Specifically I'm not sure what to put in the New Volume form; or possibly I'm unclear how to properly mount a gdrive using rclone.

                          60053e95-451a-472c-a3f4-23d433cc4d74-image.png

                          1 Reply Last reply Reply Quote 1
                          • E
                            eddowding last edited by

                            @martinkbs a detailed how-to guide would be wonderful here, if you can help.

                            I've mounted using rclone by following this guide: https://rclone.org/drive/

                            But I'm not clear on then how to have cloudron see that as a volume. Specifically I'm not sure what to put in the New Volume form; or possibly I'm unclear how to properly mount a gdrive using rclone.

                            60053e95-451a-472c-a3f4-23d433cc4d74-image.png

                            martinkbs girish 2 Replies Last reply Reply Quote 0
                            • martinkbs
                              martinkbs @eddowding last edited by

                              @eddowding There are basically two steps:

                              1. Create the link with rClone with the Drive you want to synchronize the files
                              2. Mount that drive in a folder on your system so that Cloudron can view it. This is the step that you will surely miss. To do this you just have to run the following command:
                              rclone mount NAME-UNIT:/ /mnt/backups --allow-other --delete-before
                              

                              After this step, if you do a ls on the folder //mnt/backups you should already see the files that are in the Drive unit, and therefore you can already link this folder from Cloudron to make the backups. The files in the //mnt/backups folder and the Drive are synced bi-directionally.

                              If I have a gap this week, I will prepare a small guide with all the steps, because now that I remember, it is necessary to create a small bash and put it in the crontab so that everything continues to work when the server restarts ...

                              E 1 Reply Last reply Reply Quote 5
                              • girish
                                girish Staff @eddowding last edited by

                                @eddowding Looks like you are in the Volumes UI. I don't think this works like that.

                                (Just my guess) @martinkbs has manually mounted the Google Drive via SSH and then configured it as the backup destination in Backups -> Configure .

                                martinkbs 1 Reply Last reply Reply Quote 2
                                • martinkbs
                                  martinkbs @girish last edited by martinkbs

                                  You are right @girish. The screenshot of @eddowding is the volume interface.

                                  The Configure Backup Storage looks like this:

                                  98857a15-c7d7-44f8-af92-a93abce758b4-image.png

                                  Although this same procedure is also compatible with Volumes and can be used in applications such as Navidrome, etc.

                                  root@xxxxxxxxx:~# rclone config
                                  Current remotes:
                                  
                                  Name                 Type
                                  ====                 ====
                                  GDRIVE-MUSIC         drive
                                  
                                  e) Edit existing remote
                                  n) New remote
                                  d) Delete remote
                                  r) Rename remote
                                  c) Copy remote
                                  s) Set configuration password
                                  q) Quit config
                                  e/n/d/r/c/s/q>
                                  

                                  !/bin/bash
                                  /usr/bin/rclone mount GDRIVE-MUSIC:/ /mnt/media/music --allow-other
                                  

                                  0d7b37d9-d636-4dd2-aa12-27f28d4f0876-image.png

                                  Captura de pantalla 2021-12-15 a las 20.08.11.png

                                  It will also have to be included in the guide... 😛

                                  PS: GDRIVE-MUSIC is a shared drive @robi 😉

                                  1 Reply Last reply Reply Quote 4
                                  • E
                                    eddowding @martinkbs last edited by

                                    Hmm I had another crack at this, but after I try to mount the drive from the rclone command line, it sits there for ages and does not complete. 😞

                                    I tried mounting and it seems to work (gets a green light) but then a backup errors.

                                    
                                      "taskId": "2441",
                                      "errorMessage": "Unable to chown:ENOENT: no such file or directory, chown '/mnt/backups/snapshot/app_21c3ed5d-24b5-46a7-afd9-874c5e23e2c8.tar.gz'",
                                      "timedOut": false,
                                      "backupId": null
                                    

                                    All tips / ideas appreciated.

                                    1 Reply Last reply Reply Quote 0
                                    • E
                                      eddowding last edited by

                                      One of my mistakes was not leaving the rclone mount command "open". I was expecting it to complete and return a prompt.

                                      Now it's mounted and had a good crack at backing up, but ultimately came back with "copy exited with code 1 signal null"

                                      E 1 Reply Last reply Reply Quote 0
                                      • E
                                        eddowding @eddowding last edited by

                                        see https://forum.cloudron.io/topic/4753/backup-error-copy-exited-with-code-1-signal-null/9

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

                                          @eddowding can you try disabling hard links (the "Use hardlinks" checkbox in the backup configure UI) ? I am guessing hard links are not possible when using this mounted storage. cp tries to use hardlinks when that option is checked.

                                          E 1 Reply Last reply Reply Quote 0
                                          • E
                                            eddowding @girish last edited by

                                            @girish Thanks - good tip. I tried it but this time...

                                            So.. who knows?!

                                            Unable to chown:ENOENT: no such file or directory, chown '/mnt/backups/cloudron/snapshot/app_21c3ed5d-24b5-46a7-afd9-874c5e23e2c8.tar.gz'

                                            1 Reply Last reply Reply Quote 0
                                            • B
                                              bss_ last edited by

                                              I am also struggling with drive issue. I had stored some data, my space got filled but data is not there.

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

                                                I have made chown configurable for "mountpoint" provider in 7.1

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