Any other things needed in AnnotatedBackups?

Beta release: Many improvements.

This is an on-demand backup intended for developers. Key features.

(AnnotatedBackups are NOT well suited for content authors who would probably be better off with timed backups. Furthermore, it appears not compatible with timed backups. For now please use one or the other.)

This works great for me! I’m so glad to finally have a way to backup Base. So my question is:

Sorry but why is not on the libreoffice extensions site?

@mariosv, Good suggestion, thanks. I don’t know how to do that yet, but will try to learn.

Please could you stop to change the question every minute?

@mariosv, :expressionless: … Also I think every time someone comments on a question or answer, the topic gets bumped to the top; and there have been quite a few comments below recently. …Much code development has been done, and I’m nearing moving from alpha to beta versions, and so you’ll see another bump when that happens. Good to get the feedback from everyone including you. Sorry if it bothers you. BTW, are you up to speed on creating a LO extension? It looks harder than I thought.

Sorry to say but this is not the least bit attractive. In just a few minutes of testing, it has wiped out multiple backups with different names, saved backups with wrong names and removes the notification of the original document having changes which need to be saved to the original document location (allowing for real potential loss of data).

This is definitely stepping backward from the automated backups. At least with that, you don’t need to even push a button.

Haven’t even gone into deep testing or saving in Base, which if it only handles embedded is poor to begin with since most often it is recommended to at least switch to split.

This needs a GREAT deal more testing and even then don’t see any real “improvement” to the already posted automatic backups.

This is not intended to be a direct replacement for what you’re using now. Thus the name change. So probably a good idea to set a new and different backup path for it. I’ll update docs. Sorry for the loss of your backups. BTW, if you’re going to stick with AutomaticBackup there is a bug in your new code in how you purge the files which messes things up if one selects multiple BACKUPs, like for Writer. Thanks for your prompt testing & feedback. And yes, it does properly backup Base for me.

Your comment here and on the other post lead me to believe you still don’t get the Automatic Backup processing (not just the AutomaticBackup routine). The timer routines were never tested with nor intended to use any multiple backup processing. These timer routines (written by someone else) are the real basis for the processing of providing a backup automatically every X no. of Min. when changes have been made to the document. With that, there is no problem with my routine.

@EasyTrieve Opinions and reasoning aside (that’s viewpoint anyway) I still experience with latest version the same problems with the routine as previously mentioned - “…wiped out multiple backups with different names, saved backups with wrong names and removes the notification of the original document having changes which need to be saved to the original document location (allowing for real potential loss of data).”

I’m sorry you are having problems with it. I have tested with different names now and before and it works properly for me. So I don’t know, can you be more specific as to your setup and what you are seeing starting with which LO module? If Base which db. Which filters (formats)? What are your sPath and iMaxCopies set to? What other extensions do you have installed? What version of LO, and what OS? Thanks.

And feel free to debug it. I debugged your code to see what was going on. I’m not proud or all that smart, and yes this is still the alpha release.

This is the easiest and the most dangerous. 90% of my testing used a plain Writer doc - .odt file. Open a writer doc. make an obvious change to the document. Use your save to store a backup. Close the document by clicking on the X in the top bar. Re-open the document. Change is missing.

Used all default settings. Nothing added to saved file name. Saved as displayed.
Three documents by themselves in same directory.

  1. AnnotatedBackups.odt
  2. AnnotatedBackups3.odt
  3. AnnotatedBackupsBU.odt

Open & your save doc #1 3x’s - leave open

Open & your save doc #2 3x’s - leave open

Open & your save document #3 3x’s

Save #1 again and it wipes out all #1 Backups & starts trying to save but gets wiped out immediately.

@Ratslinger, thanks. Now I see. I’m working on it. Have small life interruption ahead, will report back as I have a little time.

@Ratslinger, A couple of problems fixed; it should work better now. Tests ok for me in Base, Calc, Draw, Impress, Math & Writer. Change notes here. Notes: a) Please rename the icon so tool tip says, “Save & Backup”. b) Default sPath was renamed so should not conflict with anything else anymore. I can’t promise this will fix all of your observed problems, but I hope it will. Can you please re-test when you can. Thanks.

Sorry but both problems mentioned before still exist and one that worked before doesn’t work now - Same file name different extension - occurred using Document #1 seems to save but deletes immediately. Also default number of copies is set to 50!

Just noticed. The first problem was fixed by you saving the original document instead of just resetting the flag. Don’t like that at all. Maybe I didn’t want that saved but was going to do a SAVE AS with the changes. Took away my option. This also saved the original even when the backup was cancelled.

Just noticed. The first problem was fixed by you saving the original document instead of just resetting the flag. Don’t like that at all. Maybe I didn’t want that saved but was going to do a SAVE AS with the changes. Took away my option. This also saved the original even when the backup was cancelled.

Seems to me Windows doesn’t like : (colon) in file or directory names, at least in past versions. This could be another potential problem.

Took a quick look at your code - problem of deleting wrong files is obvious and stuck out like a sore thumb. Found, also, you are using code from my post not the original routine. That is why there is a statement you don’t understand. My code was the the modified version of the original used in the automated process. You would have known that if you read all the documentation (which BTW also resolves the modify flag & the Base Document determination I was so quick to answer you with).