From f5d01066535d4a468f1bfc86a307d112f4ded689 Mon Sep 17 00:00:00 2001 From: Will Budicm Date: Thu, 27 Aug 2020 10:52:13 +1000 Subject: [PATCH] Added Backup/Restore Specs. --- htdocs/cgi-bin/config.cgi | 45 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/htdocs/cgi-bin/config.cgi b/htdocs/cgi-bin/config.cgi index 60fa9aa..eb18e2d 100755 --- a/htdocs/cgi-bin/config.cgi +++ b/htdocs/cgi-bin/config.cgi @@ -432,7 +432,43 @@ print qq(
↟ Go to Top of page
- +
+

Backup Specs

+

    +
  1. Backup Rules

    +
      +
    1. Backup provides a compressed archive of the current logged in aliased database only.
    2. +
    3. Backup should be uploaded to client to restore.
    4. +
    5. Issuing backup always creates on the server an copy.
    6. +
    7. Backups are issued manually and are interactive.
    8. +
    +
  2. +
  3. Restore Rules

    +
      +
    1. The restoring is only possible if logged into the current by alias application version.
    2. +
    3. Restoration is of found missing in current log data.
    4. +
    5. Restoration is not removing entries in existing current log data.
    6. +
    7. Restoration is most likelly not possible after application upgrade.
    8. +
    9. Upgrade after restoring first, as the upgrade will migrate structure and data.
    10. +
    11. + Restoration will import previous date backup data if recreating a new aliased for it database, of the same application version. +
      • For example: If the database file has been delete or is blank on login, you than can run a restore, if you have an backup.
      +
    12. + + +
    +
  4. +
  5. Purpose

    +
      +
    1. Provides direct safeguard, besides any external backup procedures.
    2. +
    3. Provides before snapshot, if venturing into major log modifications.
    4. +
    5. Encourages experimentation, with data deletion and modification.
    6. +
    7. Required if downgrading from an failed application upgrade, or found missuesed and corrupted current data state.
    8. +
    +
  6. +

+
+

L-Tags Specs

@@ -1021,7 +1057,8 @@ sub restore { my $m1 = "it is not permitted to restore another aliases log backup."; $m1= "has your log password changed?" if ($tar=~/_data_$userid/); - my $cmd = `tar tvf $tar 2>/dev/null` or die qq(, possible an security issue, $m1\nFAILED READING $tar. \nYour alias is: $userid.\n); + my $cmd = `tar tvf $tar 2>/dev/null` + or die qq(, possible an security issue, $m1\nBACKUP FILE INVALID! $tar\nYour data alias is: $userid\nYour LifeLog version is:), &Settings::release ."\n"; print "Contents->".$cmd."\n\n"; $cmd = `tar xzvf $tar -C $dbck --strip-components 1 2>/dev/null` or die "Failed extracting $tar"; @@ -1082,10 +1119,12 @@ sub restore { $b_db->disconnect(); $db->disconnect(); + `rm -rf $dbck/`; print "Done!"; } catch{ - $ERROR = "Restore failed! hndl->$hndl $@ \nbr:[@br]";#,show_trace=>&Settings::debug); + $ERROR = "Restore failed! hndl->$hndl $@ \n"; + $ERROR = "br:[@br]" if(@br); }; my $back = $cgi->url( -relative => 1 ); -- 2.34.1