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
      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
                    • wilrikerundefined
                      wilriker @Jacotheron
                      last edited by

                      @jacotheron I found something that might be the reason for the error message you are seeing. I uploaded a possible fix to my Dropbox. Can you please test if this issue still occurs in that version?

                      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 tested the new version, and it worked - no issues found. The devices file was made and saved.

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

                          @jacotheron Thanks for confirming. I will do an official bug fix release tomorrow.

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

                            Bug fix release to fix the issue where on Windows rfm.toml would not be overwritten. Get it at GitHub Releases page.

                            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 2
                            • gtj0undefined
                              gtj0
                              last edited by

                              Hey Manuel, rfm has been working great for me but is there any chance you could automatically exclude the "System Volume Information" directory or maybe save excludes in the rfm.toml file?

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

                                @gtj0 I'll think about something.

                                Meanwhile you can also use rfm to just delete this stupid folder. It doesn't serve any purpose in the first place. I don't think that removable media are supposed to even have this folder.

                                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 @gtj0
                                  last edited by

                                  @gtj0 Here you go

                                  Release v1.1.0-RC1

                                  Get it at the GitHub Releases page.


                                  This release implements the persisting of -exclude parameter values in rfm.toml. These parameters will be persisted separately for backup and upload command so they do not confuse each other.

                                  A new keyword reset has been added as a recognized value for the -exclude parameter to delete all persisted excludes for the current command, i.e.

                                  rfm backup -exclude reset ...
                                  

                                  will remove all persisted excludes for the backup command. Further -exclude parameter after that (even in the same command) will add new excludes.

                                  Note that order is relevant, i.e.

                                  rfm backup -exclude 0:/gcodes -exclude reset backup-dir 0:/
                                  

                                  will backup everything in 0:/ since the given exclude for 0:/gcodes was reset by the following -exclude reset parameter.

                                  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
                                  • gtj0undefined
                                    gtj0
                                    last edited by

                                    Is -removeLocal working?

                                    ./rfm backup -domain duet0 -removeLocal /tmp/duet0 /
                                    ...
                                    Removing no longer existing files in /tmp/duet0/gcodes

                                    But it doesn't actually remove any files from the local filesystem.

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

                                      @gtj0 Last time I checked it worked. It will only remove local files that do not exist anymore on remote (like -delete for rsync). I will check tomorrow if something is broken with 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
                                      • wilrikerundefined
                                        wilriker @gtj0
                                        last edited by

                                        @gtj0 You were right, -removeLocal was broken for removed files (it worked for removed directories). So here is

                                        Release v1.1.0-RC2

                                        This fixes broken -removeLocal parameter of the backup sub-command that did not delete files locally.

                                        Get it at the GitHub Releases page.

                                        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

                                        gtj0undefined 1 Reply Last reply Reply Quote 2
                                        • 3mmundefined
                                          3mm
                                          last edited by

                                          Hi wilriker,

                                          I hate to sound stupid, but how do I use it? Where do I put the files? And how do I access it? My system is Windaze 7 PC and a DUET-EtherNet controller.

                                          Thanks in advance...3mm

                                          There are 10 types of people: Those who understand binary and those who don't.

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

                                            @wilriker

                                            Yep, -removeLocal now works.
                                            You can't specify the remote directory as 0:/ any more though. Not sure if this is intentional or not.

                                            $ ./rfm backup -domain duet0 /tmp/duet0 0:/
                                            2019/07/30 05:49:53 Fetching filelist for 0:/0:
                                            2019/07/30 05:49:53 Directory not found
                                            

                                            Doesn't matter to me, not sure if it's matter to others.

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