Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    rfm - RepRapFirmware FileManager [duetbackup successor]

    Scheduled Pinned Locked Moved
    General Discussion
    24
    83
    10.3k
    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.
    • wilrikerundefined
      wilriker @gtj0
      last edited by

      @gtj0 said in rfm - RepRapFirmware FileManager [duetbackup successor]:

      That was going to be my next suggestion.

      Feel free to fork and rename it. 😂

      Manuel
      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
      with probably always latest firmware/DWC (incl. betas or self-compiled)
      My Tool Collection

      1 Reply Last reply Reply Quote 0
      • mloidlundefined
        mloidl
        last edited by

        Hi @wilriker,

        Found a small "issue".
        If rfm is called with no arguments (I know it should not called with no args), the program exit with panic because of an invalid array access (function args). Better would be to show a proper message.

        Further tests are outstanding. I had not the time to test it yet.

        Regards,
        Martin

        wilrikerundefined 1 Reply Last reply Reply Quote 0
        • wilrikerundefined
          wilriker @mloidl
          last edited by

          @mloidl Thanks! I fixed it in the source code and it will be in the next release.

          Probably also in the next release will be a couple of changes

          • Parameters relevant for connection (i.e. domain, port and password) can be put into a file in the user's home directory so they don't have to be provided on the command line everytime
          • Some parameters that are currently given as -parametername value will be shortened to just value but then have to follow a strict ordering in case there is more than one (this resembles more common CLI tools)
          • Adding help pages similar to the main help output for sub-commands

          Manuel
          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
          with probably always latest firmware/DWC (incl. betas or self-compiled)
          My Tool Collection

          1 Reply Last reply Reply Quote 0
          • mloidlundefined
            mloidl
            last edited by

            @wilriker thanks for the quick fix.

            Regarding config file for connection parameter:
            For users having multiple duet-based printers it would be cool to to store all these connections settings domain, port and password in a kind of connection group.
            e.g.

            [printer1]
            domain=<printer1-ip>
            port=<printer1-port>
            password=<printer1-pw>
            
            [printer2]
            ....
            

            Usage then could be rfm -device printer1 <cmd>

            I did something similar in a python-based backup script for my daily backups and found this very useful.

            What's your opinion about this?

            wilrikerundefined 1 Reply Last reply Reply Quote 1
            • wilrikerundefined
              wilriker @mloidl
              last edited by

              @mloidl I like that and will implement something like this. But even though I listed it first it's currently last in priority. 😉

              Manuel
              Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
              with probably always latest firmware/DWC (incl. betas or self-compiled)
              My Tool Collection

              1 Reply Last reply Reply Quote 0
              • T3P3Tonyundefined
                T3P3Tony administrators
                last edited by

                @wilriker My vote goes for RepRapFirmware Total File Manager

                www.duet3d.com

                wilrikerundefined 1 Reply Last reply Reply Quote 2
                • wilrikerundefined
                  wilriker @T3P3Tony
                  last edited by

                  @t3p3tony said in rfm - RepRapFirmware FileManager [duetbackup successor]:

                  @wilriker My vote goes for RepRapFirmware Total File Manager

                  Yeah, that's what I thought of, too. 😂

                  Also another good idea might be
                  "[File-]Resource Manager for RepRapFirmware-based Filesystems" -> rm-rf 🤣
                  (Windows user's probably won't get this one)

                  Manuel
                  Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                  with probably always latest firmware/DWC (incl. betas or self-compiled)
                  My Tool Collection

                  deckingmanundefined 1 Reply Last reply Reply Quote 5
                  • OBELIKSundefined
                    OBELIKS
                    last edited by

                    You are evil! I wonder if anyone would even dare to use the tool in Linux then.

                    P3Steel Toolson mk2 - Duet 2 WiFi --> RatRig V-Core with Duet WiFi 1.03
                    Original Prusa i3 MK3S

                    wilrikerundefined 1 Reply Last reply Reply Quote 0
                    • deckingmanundefined
                      deckingman @wilriker
                      last edited by

                      @wilriker said in rfm - RepRapFirmware FileManager [duetbackup successor]:

                      @t3p3tony said in rfm - RepRapFirmware FileManager [duetbackup successor]:

                      @wilriker My vote goes for RepRapFirmware Total File Manager

                      Yeah, that's what I thought of, too. 😂

                      Also another good idea might be
                      "[File-]Resource Manager for RepRapFirmware-based Filesystems" -> rm-rf 🤣
                      (Windows user's probably won't get this one)

                      I "googled" that and came up with "force deletion of everything in the root directory". That's the equivalent of a "nuke" button isn't it?

                      Ian
                      https://somei3deas.wordpress.com/
                      https://www.youtube.com/@deckingman

                      wilrikerundefined 1 Reply Last reply Reply Quote 1
                      • wilrikerundefined
                        wilriker @OBELIKS
                        last edited by

                        @obeliks said in rfm - RepRapFirmware FileManager [duetbackup successor]:

                        You are evil! I wonder if anyone would even dare to use the tool in Linux then.

                        I was trying hard to find any reason to also add a / at the end to make it even more evil. 😂 And top class would be to get sudo prepended. sudo-rm-rf/. Perfect name for any tool on Linux. 🤣

                        Manuel
                        Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                        with probably always latest firmware/DWC (incl. betas or self-compiled)
                        My Tool Collection

                        OBELIKSundefined 1 Reply Last reply Reply Quote 0
                        • wilrikerundefined
                          wilriker @deckingman
                          last edited by wilriker

                          @deckingman said in rfm - RepRapFirmware FileManager [duetbackup successor]:

                          I "googled" that and came up with "force deletion of everything in the root directory". That's the equivalent of a "nuke" button isn't it?

                          More or less. There are some protections in place but if you run

                          rm -rf / [note the spaces]
                          

                          either as root user (admin user with full privileges in Linux) or prepend it with sudo (which will provide a regular user with root-rights) it will do exactly that. It will erase all contents of your hard-drive and depending on the configuration also of all mounted external drives. Not as fast as a giant hammer but fast enough to have made probably unrecoverable damage until you notice.

                          Manuel
                          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                          with probably always latest firmware/DWC (incl. betas or self-compiled)
                          My Tool Collection

                          1 Reply Last reply Reply Quote -1
                          • OBELIKSundefined
                            OBELIKS @wilriker
                            last edited by

                            @wilriker said in rfm - RepRapFirmware FileManager [duetbackup successor]:

                            @obeliks said in rfm - RepRapFirmware FileManager [duetbackup successor]:

                            You are evil! I wonder if anyone would even dare to use the tool in Linux then.

                            I was trying hard to find any reason to also add a / at the end to make it even more evil. 😂 And top class would be to get sudo prepended. sudo-rm-rf/. Perfect name for any tool on Linux. 🤣

                            That is a lot of nonoes in one sentence 🙂

                            P3Steel Toolson mk2 - Duet 2 WiFi --> RatRig V-Core with Duet WiFi 1.03
                            Original Prusa i3 MK3S

                            1 Reply Last reply Reply Quote 0
                            • wilrikerundefined
                              wilriker
                              last edited by wilriker

                              Back to business:

                              Release v1.0.0-RC2

                              I have just release v1.0.0-RC2.

                              Changes

                              Help

                              This second release candidate has help texts for every sub-command now that are accessible via

                              rfm help <command>
                              

                              Command Structure

                              The second major change is the structure of the parameters and options. This now resembles better the style of common CLI tools. Please see the appropriate help pages to see the format.

                              rfm backup Changes

                              Most notably also the format for rfm backup changed. This now is

                              rfm backup <common-options> [-removeLocal] [-exclude <excludepattern>]* [<local/path> [<remote/path>]]
                              

                              where -outDir has been reduced to <local/path> with a default of the current directory if omitted and -dirToBackup is shortened to <remote/path>. The default is still 0:/sys. In case this needs to be changed the local directory also has to be provided.

                              rfm ls

                              rfm ls now accepts multiple remote paths to list.

                              Fixes

                              • panic when no sub-command is provided is replaced with default help text
                              • Uploading single files was broken

                              Manuel
                              Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                              with probably always latest firmware/DWC (incl. betas or self-compiled)
                              My Tool Collection

                              1 Reply Last reply Reply Quote 0
                              • wilrikerundefined
                                wilriker
                                last edited by

                                Release v1.0.0

                                And here comes the first official release v1.0.0.

                                Release Notes

                                This release implements all functions listed in README.md, i.e. it can

                                • download files
                                • upload files and folder
                                • backup (like duetbackup did before but slightly different and simplified syntax)
                                • list directory contents
                                • move or rename files and directories
                                • create directories
                                • delete files and directories

                                This covers all functions of the HTTP interface.

                                Also it is capable of handling multiple devices via an automatically managed configuration file.

                                As usual there are releases for Linux x86_64, Windows x86_64, MacOS X x86_64, Linux ARM and Linux ARM64.

                                Manuel
                                Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                                with probably always latest firmware/DWC (incl. betas or self-compiled)
                                My Tool Collection

                                1 Reply Last reply Reply Quote 3
                                • mloidlundefined
                                  mloidl
                                  last edited by

                                  @wilriker
                                  Thank you very much for the release. Well done. I'll test it today when i'm at home.
                                  Especially i like the way you implemented the multi-device handling.

                                  wilrikerundefined 1 Reply Last reply Reply Quote 0
                                  • wilrikerundefined
                                    wilriker @mloidl
                                    last edited by

                                    @mloidl Thanks! 🙂

                                    Re device handling: I tried to make it as automagically as possible for the user and hope it will be useful like that.

                                    But as always: all feedback is welcome. 🙂

                                    Manuel
                                    Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                                    with probably always latest firmware/DWC (incl. betas or self-compiled)
                                    My Tool Collection

                                    1 Reply Last reply Reply Quote 0
                                    • mloidlundefined
                                      mloidl
                                      last edited by

                                      @wilriker Tested 1.0.0 and everything worked perfect.
                                      But i have one question. Is there any reason for not creating the rmf.toml as hidden file?

                                      wilrikerundefined 1 Reply Last reply Reply Quote 0
                                      • wilrikerundefined
                                        wilriker @mloidl
                                        last edited by wilriker

                                        @mloidl said in rfm - RepRapFirmware FileManager [duetbackup successor]:

                                        But i have one question. Is there any reason for not creating the rmf.toml as hidden file?

                                        None in particular. At least none other than symmetry. On Linux and MacOS it's simple by just prefixing the filename with a dot. But on Windows I would have to access file system attributes to achieve that. So I dropped this idea (that I also had in the beginning). Of course I could change the name to .rfm.toml and on Windows it would just have this name without being hidden.

                                        EDIT: I just researched how to create hidden files with Go on Windows and stumbled across an open bug that says opening hidden files on Windows for write access fails with an error. So even if I got it somehow hidden I could never edit it after that anymore.

                                        EDIT2: The above bug does not apply since I write the new settings to a temporary file and only if that was successful I overwrite the existing one with the new one so that in case writing the file fails I do not jeopardize the current settings. Still I rather don't want to go to the length of hiding the file on Windows specifically.

                                        Manuel
                                        Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                                        with probably always latest firmware/DWC (incl. betas or self-compiled)
                                        My Tool Collection

                                        1 Reply Last reply Reply Quote 0
                                        • Jacotheronundefined
                                          Jacotheron
                                          last edited by

                                          I have just tried this, and getting "Unable to save configuration to rfm.toml. The process cannot access the file because it is being used by another process."

                                          This is on Windows 10, 64bit.

                                          Just a suggestion, why not store the file in the same directory as the rfm file? Since it is a self-contained executable, I keep it in a folder, with the backup folders as sub-folders of the main folder. The idea is that I keep regular backups of this whole folder (with the rfm executable), and simply know that everything is there.

                                          Currently I have plain text files with the commands I run (for my machines), to simply copy/paste, inside of this main folder.

                                          wilrikerundefined 2 Replies Last reply Reply Quote 0
                                          • wilrikerundefined
                                            wilriker @Jacotheron
                                            last edited by

                                            @jacotheron said in rfm - RepRapFirmware FileManager [duetbackup successor]:

                                            I have just tried this, and getting "Unable to save configuration to rfm.toml. The process cannot access the file because it is being used by another process."

                                            That's not how it is supposed to be. I'll have to check if I forgot to release the file at some place. It should definitely not block itself.

                                            Just a suggestion, why not store the file in the same directory as the rfm file? Since it is a self-contained executable, I keep it in a folder, with the backup folders as sub-folders of the main folder. The idea is that I keep regular backups of this whole folder (with the rfm executable), and simply know that everything is there.

                                            The reason for that is that the executable might be in a directory where the user does not have write permissions, e.g. if I install it in Linux to /usr/local/bin/rfm (actually I do) so that it is accessible by every user of the system. The same goes for C:\Windows\* or C:\Program Files\*. If anyone wants to do that they should be able to. The only place where the user always has write permissions is the user's home directory.

                                            Manuel
                                            Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                                            with probably always latest firmware/DWC (incl. betas or self-compiled)
                                            My Tool Collection

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA