https://bugs.freedesktop.org/show_bug.cgi?id=80072

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|Other                       |All
                 OS|Linux (All)                 |All
             Status|UNCONFIRMED                 |NEW
           Severity|normal                      |enhancement
           Priority|medium                      |high
                 CC|                            |[email protected]
            Version|4.2.4.2 release             |Inherited From OOo
     Ever confirmed|0                           |1

--- Comment #1 from [email protected] ---
(In reply to comment #0)
> 
> Current behavior: All is lost forever including any backup files.

Where do you get backup files? I could only create a backup-file, when I copy
the database-file and insert it on another place. This could be made also by a
macro.
> 
> Expected behavior: A Back-up file is created which is not deleted and can be
> used to recover an accidentally deleted Database or Table.

This is a new feature you wish. It could be a good idea to minimize dataloss.
So I set the importance to high and enhancement. The problem isn't only a
problem of a specific platform and exists also in the versions of OOo before LO
has been created. So I also change Version and platform.

Not a solution for every case, but a way: The following macro will create up to
5 backups in the backup-folder of LO and then will delete the oldest backup. It
should be linked to the opening of the database-document:
-----------------------------
SUB Datenbankbackup
    DIM oPath AS OBJECT
    DIM oDoc AS OBJECT
    DIM sTitel AS STRING
    DIM sUrl_Ziel AS STRING
    DIM sUrl_Start AS STRING
    DIM i AS INTEGER
    DIM k AS INTEGER
    oDoc = ThisComponent
    sTitel = oDoc.Title
    sUrl_Start = oDoc.URL
    oPath = createUnoService("com.sun.star.util.PathSettings")
    FOR i = 1 TO 6
        IF NOT FileExists(oPath.Backup & "/" & i & "_" & sTitel) THEN
            IF i > 5 THEN
                FOR k = 4 TO 1 STEP -1
                    IF FileDateTime(oPath.Backup & "/" & k & "_" & sTitel) <= 
FileDateTime(oPath.Backup & "/" & k+1 & "_" & sTitel) THEN
                        IF k = 1 THEN
                            i = k
                            EXIT FOR
                        END IF
                    ELSE
                        i = k+1
                        EXIT FOR
                    END IF
                NEXT
            END IF
            EXIT FOR
        END IF
    NEXT
    sUrl_Ziel = oPath.Backup & "/" & i &"_" & sTitel
    FileCopy(sUrl_Start,sUrl_Ziel)
END SUB
-----------------------------

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to