Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    config.g.bak?

    General Discussion
    5
    10
    1125
    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.
    • DocTrucker
      DocTrucker last edited by

      Hi All,

      Why do I occasionally get a config.g.bak file in the system directory? Is this written because the config.g file is invalid? Any way to tell if the system is reading from the config.g or config.g.bak?

      Thanks.

      • Hardware: Duet v0.6
      • Firmware: 1.22 (2018-07-26b2)
      • DWC: 1.22.4

      Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

      fcwilt 1 Reply Last reply Reply Quote 0
      • fcwilt
        fcwilt @DocTrucker last edited by

        @doctrucker said in config.g.bak?:

        Hi All,

        Why do I occasionally get a config.g.bak file in the system directory? Is this written because the config.g file is invalid? Any way to tell if the system is reading from the config.g or config.g.bak?

        Thanks.

        • Hardware: Duet v0.6
        • Firmware: 1.22 (2018-07-26b2)
        • DWC: 1.22.4

        I have always assumed it is generated whenever config.g is edited.

        Frederick

        Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

        timcurtis67 1 Reply Last reply Reply Quote 0
        • timcurtis67
          timcurtis67 @fcwilt last edited by

          @fcwilt said in config.g.bak?:

          @doctrucker said in config.g.bak?:

          Hi All,

          Why do I occasionally get a config.g.bak file in the system directory? Is this written because the config.g file is invalid? Any way to tell if the system is reading from the config.g or config.g.bak?

          Thanks.

          • Hardware: Duet v0.6
          • Firmware: 1.22 (2018-07-26b2)
          • DWC: 1.22.4

          I have always assumed it is generated whenever config.g is edited.

          Frederick

          Yep, when you edit the config file through the DWC.

          1 Reply Last reply Reply Quote 0
          • DocTrucker
            DocTrucker last edited by

            Ok, so it is DWC that uses it rather than the machine, and the machine never uses it? Feature request for DWC to clean it up after use to save confusion or themachine to delete it on startup if present?

            Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

            bot fcwilt 2 Replies Last reply Reply Quote 0
            • bot
              bot @DocTrucker last edited by

              @doctrucker I don't think automatically deleting a backup file is optimal behaviour. Why even create the backup in the first place?

              I would think that a notification of the creation of the file would be sufficient.

              *not actually a robot

              DocTrucker 1 Reply Last reply Reply Quote 0
              • fcwilt
                fcwilt @DocTrucker last edited by

                @doctrucker said in config.g.bak?:

                Ok, so it is DWC that uses it rather than the machine, and the machine never uses it? Feature request for DWC to clean it up after use to save confusion or themachine to delete it on startup if present?

                You can always delete it yourself but I think keeping a backup is a good idea - even if it only contains the contents of the previous config.g.

                From time to time I use the DWC to download and save backups of all the various .G files needed for a complete configuration.

                Frederick

                Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

                1 Reply Last reply Reply Quote 0
                • DocTrucker
                  DocTrucker @bot last edited by

                  @bot I think the reason it is done is to stop two processes accessing/modifying the same data at the same time. At a guess DWC is creating this file so you can read and modify it without potentially accessing it at the same time as the duet ie, mid build. The rename opperation it atomic, meaning that other processes can't interrupt it by accident. I doubt it is a user backup and as such it is pretty useless as the most likely thing to happen that will cause data loss is sd card failure.

                  If it is indeed the previous config when chanhes have been made then that needs to be more obvious.

                  Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

                  fcwilt 1 Reply Last reply Reply Quote 0
                  • fcwilt
                    fcwilt @DocTrucker last edited by

                    @doctrucker said in config.g.bak?:

                    If it is indeed the previous config when chanhes have been made then that needs to be more obvious.

                    It seems to be that - I just compared the two files on my machine.

                    Frederick

                    Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

                    1 Reply Last reply Reply Quote 0
                    • dc42
                      dc42 administrators last edited by

                      That's right: whenever you edit config.g in DWC, it saves the previous version as config.g.bak to make it easier for you to roll back your changes.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      1 Reply Last reply Reply Quote 0
                      • DocTrucker
                        DocTrucker last edited by DocTrucker

                        That's fair enough, a fall back option rather than back up.

                        Perhaps add a comment at the top of the file something along the lines of:

                        ; 20181206 0836 Copy of old config superseeded by user through DWC.

                        I had though I'd mucked up the config some how and the .bak was some kind of fall back the system created when it couldn't read config.g! 😄

                        Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

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