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

    config.g.bak?

    Scheduled Pinned Locked Moved
    General Discussion
    5
    10
    1.7k
    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.
    • DocTruckerundefined
      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

      Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

      fcwiltundefined 1 Reply Last reply Reply Quote 0
      • fcwiltundefined
        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 small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

        timcurtis67undefined 1 Reply Last reply Reply Quote 0
        • timcurtis67undefined
          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
          • DocTruckerundefined
            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?

            Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

            botundefined fcwiltundefined 2 Replies Last reply Reply Quote 0
            • botundefined
              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

              DocTruckerundefined 1 Reply Last reply Reply Quote 0
              • fcwiltundefined
                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 small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                1 Reply Last reply Reply Quote 0
                • DocTruckerundefined
                  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.

                  Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                  fcwiltundefined 1 Reply Last reply Reply Quote 0
                  • fcwiltundefined
                    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 small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                    1 Reply Last reply Reply Quote 0
                    • dc42undefined
                      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
                      • DocTruckerundefined
                        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! 😄

                        Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

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