Community
    • Login

    periodic backup suddenly stopped working

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    9 Posts 4 Posters 1.3k Views
    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.
    • Adam BarczynskiA
      Adam Barczynski
      last edited by

      I’ve been using the same version of Notepad++ for few years, there were no major problems, but recently it started to crash and empty the active tab quiet often.

      No problem - I restored the backup from Roaming and that was it. Yesterday it happened again, I checked the backup dir and the backup was not there, so 4 hours of work went down the drain. But I also noticed that in periodic backup there was just 1 file stored from last almost 2 weeks and notepad++ is my most often used tool.

      Checked the settings, it was on for periodic backup, checked if dir is correct for backup, switched on the user-defined backup, installed newer version of the np++ and periodic backup is simply not happening. The backup in my folder (on save), yes, but it isn’t periodic backup.

      There were no changes in my system, the editor configuration has not changed, even after re-installing editor the periodic backup is not doing anything. I even checked the session.xml and the file has parameter backupFilePath=“” (empty).

      Any ideas what might have happened or how to fix it? I’m afraid it will happen again and I’m not keen to lose another few hours of work…

      Adam BarczynskiA PeterJonesP 2 Replies Last reply Reply Quote 0
      • Adam BarczynskiA
        Adam Barczynski @Adam Barczynski
        last edited by

        and btw. in config.xml I have

        <GUIConfig name=“Backup” action=“1” useCustumDir=“yes” dir=“D:\backup” isSnapshotMode=“yes” snapshotBackupTiming=“7000” />

        yet it makes backup only on manual save, not snapshot mode

        1 Reply Last reply Reply Quote 0
        • PeterJonesP
          PeterJones @Adam Barczynski
          last edited by

          @adam-barczynski ,

          If you have Notepad++ in session-snapshot-and-periodic-backup mode, then if you close the file in Notepad++ (or if Notepad++ otherwise thinks the file has been closed), it gets rid of the temporary periodic-backup file. So that might explain it.

          Since you’ve used the same version for years, it’s obviously not a new bug; but that also means that you haven’t had years worth of bug fixes – including bug fixes that have made saves much more reliable then they were a few years back–, so it’s a bit weird that “nothing changed” but the behavior started changing. If you had told us what that version was, maybe we could do more specific checking (or just tell you to upgrade; v8.2.1 is quite stable).

          But I have never seen periodic backup “simply not happening” if it’s turned on, even in versions from years ago. Something must be wrong on your end. Maybe you have multiple installations of Notepad++, and you’re looking at the settings on one but running in another. Or maybe you have a permissions issue on %AppData%\Notepad++\, so it cannot write to the backup folder, or you are running as user X (maybe Administrator) but looking in your normal user Y’s AppData. Or maybe you have local-configuration turned on, so that the backups are being kept under the Notepad++

          Actually, your config.xml says,

          <GUIConfig name=“Backup” action=“1” useCustumDir=“yes” dir=“D:\backup” isSnapshotMode=“yes” snapshotBackupTiming=“7000” />

          That says that you are trying to use the custom directory D:\backup. Did you check in D:\backup? Or did you just check in “roaming” (which is more accurately called %AppData%)?

          (Sorry, I ran a test and confirmed that the useCustumDir setting in config.xml only applies to backup-on-save, not to the periodic backup. Hence the cross-out.)0

          I even checked the session.xml and the file has parameter backupFilePath=“” (empty).

          That is so strange. The only way I can get that condition is by not having any unsaved changes (ie, by saving all open files before exiting notepad++), or by having isSnapshotMode="no" in config.xml

          If possible, sharing with us the actual state of your Settings > Preferences > Backup (use Alt+PrintScreen and paste the image in your reply) might help us see what’s going wrong for you.

          Also, running the quick experiment:

          1. File > New, type a few characters, and make sure that Notepad++ thinks you have unsaved changes
          2. Settings > Preferences > Backup: make sure “Remember current session for next launch” and “Enable session snapshot and periodic backup” are both checked on: e86587f8-3b09-47a9-8f4d-bbced96c368b-image.png
          3. Exit Notepad++
          4. If it prompts you to save your unsaved changes, that means you do not have snapshot turned on. If it doesn’t, you should have it on
          5. Re-run Notepad++, and see if that new 1 file is still there or not. If it is, then snapshot is turned on, and working as expected.
          6. Share your ?-menu’s Debug Info, as well as the results of this experiment.

          so 4 hours of work went down the drain. … I’m not keen to lose another few hours of work…

          Do you know what the easiest way to not lose hours of work is? To hit the save button or keystroke occasionally, or set something up that does the equivalent (like AutoSave Plugin). My personal opinion is that if you truly care enough about your work to not want to lose it, you will care enough about it to save (“save early, save often”), and use backup and/or version control if you really care about it. To do otherwise, but then get upset when data is lost, is to not have aligned your actions with your desires, which seems a poor choice to me.

          Adam BarczynskiA Alan KilbornA 2 Replies Last reply Reply Quote 4
          • Adam BarczynskiA
            Adam Barczynski @PeterJones
            last edited by

            @peterjones said in periodic backup suddenly stopped working:

            Do you know what the easiest way to not lose hours of work is? To hit the save button or keystroke occasionally

            That’s cute, but you missed one detail - that was EXACTLY WHAT I WAS DOING, after one of those “hit the save button” notepad++ just crashed and at the same time emptied my file - that is the point of my problem.

            It happened few times in the past, but I ALWAYS HAD BACKUP in Roaming, not this time - that is the second part of my problem.

            I tried your experiment and it did not prompt to save file, this time it actually created file in Roaming, after re-start the file was there, still unsaved, so it’s not the access problem, it’s not the settings problem.

            I don’t know, I guess it’s just the old Murphy’s Law - if something is about to f*ck up, it will be the one thing that will be the hardest to fix. Thanks for your advice, just have to see if the re-installation actually fixed that problem.

            PeterJonesP 1 Reply Last reply Reply Quote 0
            • PeterJonesP
              PeterJones @Adam Barczynski
              last edited by PeterJones

              @adam-barczynski said in periodic backup suddenly stopped working:

              That’s cute, but you missed one detail - that was EXACTLY WHAT I WAS DOING, after one of those “hit the save button” notepad++ just crashed and at the same time emptied my file - that is the point of my problem.

              And that is a bug that was known about, and has been fixed.

              And, by the way, as soon as the save completes, Notepad++ deletes the snapshot “backup”, because that backup only exists while there are unsaved changes. This is important to know, and is described in the FAQ for periodic backup vs AutoSave plugin. I think you might benefit from the AutoSave plugin.

              Adam BarczynskiA 1 Reply Last reply Reply Quote 0
              • Alan KilbornA
                Alan Kilborn @PeterJones
                last edited by

                @peterjones said in periodic backup suddenly stopped working:

                Share your ?-menu’s Debug Info

                @Adam-Barczynski

                Where is that data?

                1 Reply Last reply Reply Quote 2
                • Adam BarczynskiA
                  Adam Barczynski @PeterJones
                  last edited by

                  @peterjones said in periodic backup suddenly stopped working:

                  And that is a bug that was known about, and has been fixed.

                  but it’s the first time it worked that way - I guess I learned my lesson the hard way

                  @alan-kilborn said in periodic backup suddenly stopped working:

                  Where is that data?

                  Thank you, but @peterjones pretty much nailed my problem and there’s no point in looking for more answers.

                  1 Reply Last reply Reply Quote 0
                  • Ken DetweilerK
                    Ken Detweiler
                    last edited by

                    “Enable session snapshot and periodic backup” absolutely does not work

                    Alan KilbornA 1 Reply Last reply Reply Quote 0
                    • Alan KilbornA
                      Alan Kilborn @Ken Detweiler
                      last edited by

                      @ken-detweiler said in periodic backup suddenly stopped working:

                      “Enable session snapshot and periodic backup” absolutely does not work

                      Great bug report.
                      What version of Notepad++ are you referring to?
                      I am certain there will be further questions for someone that says something “absolutely does not work” and those are 4 words of a 10-word description.

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors