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. Support
  3. Dangerous server mod ?

Dangerous server mod ?

Scheduled Pinned Locked Moved Solved Support
8 Posts 3 Posters 1.5k Views 2 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.
    • timconsidineT Offline
      timconsidineT Offline
      timconsidine
      App Dev
      wrote on last edited by timconsidine
      #1

      Checking on the feasibility and wisdom of some mad plan in my head.

      I want to move files from one app (Home Automation) data directory to another app (Emby) data directory.
      The apps are containerised so I can't run a script in one to push/pull to another.

      But I can SCP on desktop and I have tested using rclone on desktop to move the files from source to destination.
      However my desktop is not always on so not a good place to make into a cron script.

      There is a warning when SSH-ing into the cloudron server not to run any updates, and to leave this to the cloudron install. Fully understand and respect this.

      But could I add a cron script which would do this sync operation ?
      Probably could, but maybe bigger question is : should I ?

      Maybe it is unwise or even "dangerous" for the health of the cloudron server to have a user script running, even if it is as basic as an rclone/rsync/bash script.

      nebulonN 1 Reply Last reply
      0
      • timconsidineT timconsidine

        Checking on the feasibility and wisdom of some mad plan in my head.

        I want to move files from one app (Home Automation) data directory to another app (Emby) data directory.
        The apps are containerised so I can't run a script in one to push/pull to another.

        But I can SCP on desktop and I have tested using rclone on desktop to move the files from source to destination.
        However my desktop is not always on so not a good place to make into a cron script.

        There is a warning when SSH-ing into the cloudron server not to run any updates, and to leave this to the cloudron install. Fully understand and respect this.

        But could I add a cron script which would do this sync operation ?
        Probably could, but maybe bigger question is : should I ?

        Maybe it is unwise or even "dangerous" for the health of the cloudron server to have a user script running, even if it is as basic as an rclone/rsync/bash script.

        nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #2

        @timconsidine if both apps run on the same Cloudron, then you can do a simple file copy via SSH. Each app gets a folder from the host system mounted into the app container. From the app perspective, this is /app/data while from the host system this would be /home/yellowtent/appsdata/<appid>/data

        So you can just copy things around there, as long as the app can deal with such changes, Emby can for sure. Also you want to restart the app after the copy, just to fixup file permissions if you are unsure how to fix them manually.

        timconsidineT 1 Reply Last reply
        0
        • nebulonN nebulon

          @timconsidine if both apps run on the same Cloudron, then you can do a simple file copy via SSH. Each app gets a folder from the host system mounted into the app container. From the app perspective, this is /app/data while from the host system this would be /home/yellowtent/appsdata/<appid>/data

          So you can just copy things around there, as long as the app can deal with such changes, Emby can for sure. Also you want to restart the app after the copy, just to fixup file permissions if you are unsure how to fix them manually.

          timconsidineT Offline
          timconsidineT Offline
          timconsidine
          App Dev
          wrote on last edited by
          #3

          @nebulon thank you
          Yes, this is what I have tested out
          Question is more : if I add it to the server logged in via SSH, will I break something ?
          Doing it manually is not a good solution, although will live with that if I have to. Would prefer a cron on the server.

          nebulonN 1 Reply Last reply
          0
          • timconsidineT timconsidine

            @nebulon thank you
            Yes, this is what I have tested out
            Question is more : if I add it to the server logged in via SSH, will I break something ?
            Doing it manually is not a good solution, although will live with that if I have to. Would prefer a cron on the server.

            nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #4

            @timconsidine depending on the app, do you think shared volumes between the apps could help here instead of a scheduled copy?

            timconsidineT 2 Replies Last reply
            2
            • nebulonN nebulon

              @timconsidine depending on the app, do you think shared volumes between the apps could help here instead of a scheduled copy?

              timconsidineT Offline
              timconsidineT Offline
              timconsidine
              App Dev
              wrote on last edited by
              #5

              @nebulon now that's a neat idea, thank you.
              Why didn't I think of that. Answer : can't see wood for trees!

              Yes, let me investigate. I haven't done for that for any cloudron apps, so I will have to learn. But that's a good thing.

              1 Reply Last reply
              0
              • nebulonN nebulon

                @timconsidine depending on the app, do you think shared volumes between the apps could help here instead of a scheduled copy?

                timconsidineT Offline
                timconsidineT Offline
                timconsidine
                App Dev
                wrote on last edited by
                #6

                @nebulon Thanks again for that idea.
                I set up a volume which both apps can see.
                And Emby as the receiving media player can see files.
                I can't get HomeAssistant to write to the volume at the moment.
                Permissions seem ok, so investigating.
                But great idea, saves file moving etc.

                njN 1 Reply Last reply
                1
                • timconsidineT timconsidine

                  @nebulon Thanks again for that idea.
                  I set up a volume which both apps can see.
                  And Emby as the receiving media player can see files.
                  I can't get HomeAssistant to write to the volume at the moment.
                  Permissions seem ok, so investigating.
                  But great idea, saves file moving etc.

                  njN Offline
                  njN Offline
                  nj
                  wrote on last edited by nj
                  #7

                  @timconsidine you can simply use the copy-recursive command to transfer files. If it succeeds delete it from the source. Simply SSH into your box ssh root@my.yourbox.com.

                  
                  cp -R \
                   /home/yellowtent/appsdata/<home-app-id>/data/* \
                   /home/yellowtent/appsdata/<emby-app-id>/data 
                  
                  # then later use the file manager to delete data from home automation, or run
                  rm -rf /home/yellowtent/appsdata/<home-app-id>/data/*
                  
                  

                  Founder / Coder • My Apps

                  timconsidineT 1 Reply Last reply
                  0
                  • njN nj

                    @timconsidine you can simply use the copy-recursive command to transfer files. If it succeeds delete it from the source. Simply SSH into your box ssh root@my.yourbox.com.

                    
                    cp -R \
                     /home/yellowtent/appsdata/<home-app-id>/data/* \
                     /home/yellowtent/appsdata/<emby-app-id>/data 
                    
                    # then later use the file manager to delete data from home automation, or run
                    rm -rf /home/yellowtent/appsdata/<home-app-id>/data/*
                    
                    
                    timconsidineT Offline
                    timconsidineT Offline
                    timconsidine
                    App Dev
                    wrote on last edited by
                    #8

                    @nj Thank you
                    I'm trying to do it without manual intervention.
                    More or less got the shared volume mount working.

                    1 Reply Last reply
                    1
                    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