• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    3mm @wilriker
    last edited by 1 Aug 2019, 09:33

    @wilriker

    Thank you very much!

    3mm

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

    1 Reply Last reply Reply Quote 0
    • undefined
      wilriker
      last edited by wilriker 8 Jul 2019, 09:40 7 Aug 2019, 09:39

      Arch User Repository Package

      For Arch Linux users: I have submitted a package to install rfm via AUR: https://aur.archlinux.org/packages/rfm/

      This is available for x86_64, arm, armv6h, armv7h and aarch64.

      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
      • undefined
        wilriker
        last edited by 12 Aug 2019, 10:59

        Release v1.1.0

        v1.1.0 has existed Release Candidate stage and is now available at GitHub Releases page or via Arch User Repository.

        Reiterating the changes:
        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.

        Bug Fixes

        • -removeLocal was broken for files (working for directories though)
        • Sub-command upload would fail most of the times (this was fixed between RC3 and this 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 1
        • undefined
          fma
          last edited by 17 Aug 2019, 10:52

          I'm trying to use your script, but I always get 'invalid character '<' looking for beginning of value' error. What am I doing wrong?

          I'm using the amd64 version...

          Thanks.

          Frédéric

          undefined 1 Reply Last reply 17 Aug 2019, 17:15 Reply Quote 0
          • undefined
            wilriker @fma
            last edited by wilriker 17 Aug 2019, 17:15

            @fma This happens if the Duet responded with an HTML error page instead of a JSON error. I've seen this happen more often recently but so far have not found the cause.

            Are you using the latest v1.1.0 final release above?

            Also which sub-command does this happen for? Also you can use the parameter -debug to see the actual response coming from the Duet. This might give a hint what's going wrong.

            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
            • undefined
              fma
              last edited by 18 Aug 2019, 10:56

              Yes, I'm using the final release.

              The error happens with all commands, and -debug does not give much info:

              ./rfm ls 0:/ -debug
              
              0::
              2019/08/18 12:52:40 invalid character '<' looking for beginning of value
              

              BTW, does it require a specific version of RRF? Im' running 2.02RC2...

              Frédéric

              undefined 1 Reply Last reply 18 Aug 2019, 17:29 Reply Quote 0
              • undefined
                wilriker @fma
                last edited by wilriker 18 Aug 2019, 17:29

                @fma It should work with any version of RRF. Though the -debug parameter has to come before the location to list (in this case) or more general: before any parameter that does not have its own -something prefix.

                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
                • undefined
                  fma
                  last edited by 20 Aug 2019, 16:11

                  My bad, I made a mistake in the device name! All seems to work fine 🙂

                  Thanks for your help.

                  Frédéric

                  undefined 1 Reply Last reply 20 Aug 2019, 21:13 Reply Quote 0
                  • undefined
                    wilriker @fma
                    last edited by 20 Aug 2019, 21:13

                    @fma I'm glad it was that simple. 🙂

                    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
                    • undefined
                      wilriker
                      last edited by 16 Oct 2019, 12:37

                      Release v1.1.1

                      v1.1.1 has been release and can be found at GitHub Releases page.

                      Changes

                      • New -debug option to output the HTTP requests being sent to RRF
                      • Add CRC32 checksum as HTTP header to file uploads (supported by RRF 2.04RC3 and newer).

                      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
                      • PaulHewundefined
                        PaulHew
                        last edited by PaulHew 16 Jan 2020, 21:30

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • PCRundefined
                          PCR
                          last edited by 13 Nov 2020, 07:21

                          @wilriker Is it possibble to upload a file and start the print?

                          Best

                          undefined 1 Reply Last reply 13 Nov 2020, 08:36 Reply Quote 0
                          • undefined
                            wilriker @PCR
                            last edited by 13 Nov 2020, 08:36

                            @PCR No, this is not a feature of rfm. It was and is intended to manage files on the SD card but not further interaction with the RepRapFirmware.

                            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
                            • PCRundefined
                              PCR
                              last edited by 13 Nov 2020, 09:11

                              Ah OK. Thank you! BTW will it work with an DUET3 with a PI?

                              Best

                              undefined 1 Reply Last reply 13 Nov 2020, 12:02 Reply Quote 0
                              • undefined
                                wilriker @PCR
                                last edited by 13 Nov 2020, 12:02

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

                                BTW will it work with an DUET3 with a PI?

                                No, it won't because in that setup the files are located on the RPi and for Linux there are much better file managers than I could ever come up with. 😉

                                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
                                • oliofundefined
                                  oliof
                                  last edited by 13 Nov 2020, 12:59

                                  It would be nice to have rfm support RRF3 with SBC for consistency's sake though (-:

                                  <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                                  tristanryerparkeundefined 1 Reply Last reply 2 Jan 2021, 16:11 Reply Quote 1
                                  • tristanryerparkeundefined
                                    tristanryerparke @oliof
                                    last edited by 2 Jan 2021, 16:11

                                    @oliof I second this

                                    1 Reply Last reply Reply Quote 1
                                    • laelundefined
                                      lael
                                      last edited by lael 20 Jan 2021, 05:29

                                      I was just directed to RFM for backing up our Duet. Thank you to @wilriker it's amazing!

                                      However, getting it started was a little slower than it needed to be. If you are on Windows and looking for a way to backup your Duet, here is a quickstart guide / manual that might help speed things up for you. (The guide may help if you aren't on Windows, but you'll need to adapt file paths etc as appropriate).

                                      Download and unzip to C:\Users\YourUserName and name the folder 'DuetBackupRFM'
                                        
                                      Open Command prompt (Start - cmd - enter) which will open at c:\Users\YourUserName
                                      
                                      Chang the cmd prompt folder to the one you just unzipped to: 
                                      Type: cd DuetBackupRFM 		; and hit enter
                                      
                                      Now you are ready to use RFM to backup your Duet. Read below. 
                                      
                                      
                                      RFM Duet Backup Commands: 
                                      
                                      **note: must use program name, command name, then can use options and parameters/arguments.  
                                      **ONCE a device has been specified (a device profile is created on first use), you can refer to the device without networking options by using the device name. 
                                      
                                      
                                      RFM Command Syntax Explanation: 
                                      
                                      Valid Example command: 
                                      	rfm backup -device YourPrinterName sys 0:/sys
                                      
                                      Explanation: 
                                      	rfm 		backup 		-device 	YourPrinterName 	sys 			0:/sys
                                      	program name	command name	option name	parameter for option	local comp. folder to save to	Duet folder to do command to
                                      
                                      
                                      Things you likely want to do: 
                                      
                                      STEP 1. connect to the Duet (creates a config for the Duet as the -device name) and list The Duet's root directory: 
                                      	rfm ls -domain 192.168.1.12 -port 80 -password YourDuetPassword -device YourPrinterName
                                      
                                      STEP 2. Backup the sys folder on your duet (already created in step 1 in RFM) into a folder on your computer called 'sys' (which will be located in the same folder RFM.exe is located). 
                                      Note: RFM will create the folder on your computer if it does not exist. RFM will also use UNC / absolute paths if preferred (so you can redirect outside of the RFM folder - see examples at end). 
                                       
                                      	rfm backup -device YourPrinterName sys 0:/sys
                                      
                                      STEP 3. Backup the macros folder for your duet (already created in RFM) to a local 'macros' folder: 
                                      	rfm backup -device YourPrinterName macros 0:/macros
                                      
                                      STEP 4. Backup the filaments folder for your duet ((already created in RFM) to a local 'filaments' folder: 
                                      	rfm backup -device YourPrinterName filaments 0:/filaments
                                      
                                      STEP 5. Backup the gcode files on your duet (already created in RFM) to a local 'macros' folder: 
                                      	rfm backup -device YourPrinterName gcodes 0:/gcodes
                                      
                                      
                                      - - Some other Examples: - - 
                                      List all the files in the folders in the root of your duet: 
                                      	rfm backup -device YourPrinterName
                                      
                                      List all the files in the sys folder on your duet: 
                                      	rfm backup -device YourPrinterName 0:/sys
                                      
                                      List all the files in a folder on duet with spaces in its name: 
                                      	rfm ls -device YourPrinterName "0:/macros/calibration/bed leveling"
                                      
                                      If you are using spaces in your RFM backup path or on duet - enclose in quotation marks: 
                                      	rfm backup -device YourPrinterName "C:users/yourusername/DUET BACKUP RFM"  "0:/macros/calibration/bed leveling"
                                      
                                      1 Reply Last reply Reply Quote 2
                                      • demonlibraundefined
                                        demonlibra
                                        last edited by 15 Oct 2021, 08:21

                                        Write script for bash (GNU/Linux) to backup all files.

                                        #!/bin/bash
                                        
                                        # ---------------------------------- Parameters -------------------------------------
                                        temp="temp"											# Temp folder for backup
                                        output="backup_rrf_$(date +%F_%H-%M-%S).tgz"		# Archive name for backup
                                        
                                        # -----------------------------------------------------------------------------------
                                        mkdir -p $temp										# Create temp folder
                                        
                                        ./rfm ls | while read line							# Parse list of files and folders
                                        	do
                                        		if [[ `echo "$line" | grep "\[f\]"` ]]		# Processing files
                                        			then
                                        				filename=`echo ${line##*	}`
                                        				./rfm download "$filename" "$temp/$filename"
                                        				echo "$filename - File downloaded"
                                        
                                        		elif [[ `echo "$line" | grep "\[d\]"` ]]	# Processing folders
                                        			then
                                        				foldername=`echo ${line##*	}`
                                        				./rfm backup -exclude overlays "$temp/$foldername" "$foldername"
                                        				echo -e "\n"
                                        
                                        		else echo "$line - Strange line"
                                        		fi
                                        	done
                                        		
                                        tar czPf "$output" "$temp"							# Create archive
                                        rm -rf "$temp"										# Delete temp folder
                                        
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • Phaedruxundefined Phaedrux referenced this topic 1 Dec 2021, 17:25
                                        • Phaedruxundefined Phaedrux referenced this topic 6 Dec 2022, 18:57
                                        • jens55undefined
                                          jens55
                                          last edited by 7 Dec 2022, 02:26

                                          I am trying out rfm. I go into the folder that has rfm in it and do:
                                          ./rfm backup -domain 192.168.1.163
                                          this backs up the /sys folder on the duet card that is at 192.168.1.163.
                                          If I want to back up the macro folder on that Duet, what should the command look like? Based on the help section of rfm, I was trying ./rfm backup /macros -domain 192.168.1.163 but I get 'directory not found'.

                                          undefined 1 Reply Last reply 7 Dec 2022, 14:19 Reply Quote 0
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA