kicad-developers team mailing list archive
Mailing list archive
Re: Auto-generated backup files: are they useful?
Jon Evans <jon@xxxxxxxxxxxxx>, KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
Andrew Zonenberg <azonenberg@xxxxxxxxxxxxxxx>
Mon, 29 Jun 2020 12:27:42 -0700
addr=azonenberg@xxxxxxxxxxxxxxx; keydata= mQINBFYwW74BEAC3eShxML7XJ84wi8PjUrZwt4ap+smZ91e3K5BFJQTTzFIWo91Ho38n0v3x ODrH0Pj9edB1fhO90Vh0C0nFu52SgAh5kMzUOae4WMZb0WszCw7jdu3DcUHAwU70eZ8w1dty aG55PEnQaxNYI2aEfxwvoJ1EjajcZnvd+lp5KktjhaTNzYTRaAd2o6f1Arhx8iRQzM4YXewF 6DqUNPdZ+CgZlrjOlFsSyn22nVWcxzDzcx7y2K7jui6m69XIQbsb7KV3sp6XkF2MjM/lMvQj /csWiYEY6G1o0QXdtWyVxnCQ7u+Yffi4ymCHyP+z358hQO0VygfSoMKjT0GusAKdndC+9BLK fxbVGQyMT2JFGhz2a1iW9sTR0bwDSYOmf5u0UzgdWFKJli5YTJTaqP3pZgS9K0Gss0hMqLbw t/Gz2tBmc606g7ct3YcKF0MeXW26AtUoAFzcrMxqsSjtC3OCdSQKxC9dJ+lhB43KHM5bWdmw AaDJ3J6UyDlSniS81zkwi/MjdIY+OYD7EH9hkmYsxvKjwad0klsHBDsoFPErmogfRWl99aCD uf/liKRbNh3SQvmEWH4FfrVw9AAFTn4vuLfYZlh54FYHDc8LBFFBUR/b3txo/moe/pxXJ+OL CQ6Tjxh0AtML4uNI144vf/v8dbfI81uZO/Q+2rAEhy5KARlLlwARAQABtD5BbmRyZXcgWm9u ZW5iZXJnIChQZXJzb25hbCBFbWFpbCkgPGF6b25lbmJlcmdAZHJhd2Vyc3RlYWsuY29tPokC VQQTAQgAPwIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AWIQSFm6e63pwL1ewB/zY0YXq5 sxx9fAUCXQP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PJbalFc7y7Ptee/W1 wNCqXsOrUqQRrUtwErLBqUxJKPDa6BERaxY9
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0
I find them annoying and have to add them to my gitignore's etc constantly.
They're of no value to me because I tend to save every 30 seconds or so
The *one* thing they might be useful for is guarding against kicad
segfaulting or other failures (disk full, NFS connection lost, etc)
during the save process itself. To do this, I'd suggest:
* Move old file to file.bak
* Write new file
* Delete old file if everything worked. If something goes wrong before
reaching this point, you can restore from the bak.
On 6/29/20 12:23 PM, Jon Evans wrote:
> Currently, KiCad automatically creates backups of schematic and PCB
> files when you save a file.
> The logic for these backups is basically: if a file already exists
> with the same name as what we are saving, copy that file to a new file
> and give it the "-bak" suffix on the file extension.
> These backups are stored next to the original file in the current
> KiCad codebase. This understandably creates clutter that some people
> don't like (myself included) so in the project-settings branch that is
> about ready to be merged, I changed this behavior to place all these
> backups in a special backups folder for the project.
> This proved to have some complications around the handling of files
> outside the project path (which it's possible to have with
> hierarchical schematic sheets) so I need to do something else.
> After some thought, I am pretty convinced that the right thing to do
> is just *remove this backup feature entirely*. Here's why:
> 1) It's not a very good backup: It just stores the state from the
> last time you hit "save". If you hit save again, your backup is blown
> up. So, it's really like a "undo" function, but on disk, and with
> only one level of undo.
> 2) Recently I changed how we save schematic and board files to fix
> some unrelated issues people were seeing with cloud backup services.
> Before this change, if KiCad crashed or had some other serious error
> while saving a file, the file would be lost (because we used to delete
> the old file and then write a new one in its place). After this
> change, we write the new file to a temporary location, and only if
> that write succeeds do we copy it on top of the old file. I think
> this vulnerability to generating corrupt files if we crash was one of
> the reasons for this backup file system, and that reason is now gone.
> 3) Because it's not a very good backup, I worry that the fact that
> "bak" files exist might cause some users to have a false sense of
> security and not use a true backup system (like a version control
> system, or some other mechanism that actually backs up files
> periodically). I want to remove this false sense of security so that
> it is more clear that users should back up their files in some way if
> they care about the work.
> In other words, I don't think this feature actually gives enough value
> to make it worth the clutter in the project folder and/or the
> development effort to make it work well with less clutter.
> So, I'd like to hear from others on this: anyone disagree?
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp