health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health-dev] [task #16142] improve gnuhealth-control backup & restor


From: Gerald Wiese
Subject: Re: [Health-dev] [task #16142] improve gnuhealth-control backup & restore
Date: Thu, 14 Apr 2022 16:47:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

Hello,

regarding the backups of the gnuhealth-control command I modified this bash script in a way that backups are differentiated into attachments, database & environment. Before a potential commit I would work on restore & tests but before doing this I would like to see what you think about it.


Problems I see in the current state:

- All files & database are processed twice because there is filesystem+database+filesystem&database

- All python & tryton modules are copied every time

- It fails if the database is not on the same system

- Restore can not be combined with changing the environment

- systemd .service file is not part of the backup

- It is not working for differing config file locations


Hopefully I could solve those problems with the new approach. It should at least work for installations following the wikibooks documentation, using the zypper package and modifications like my ansible scripts which are based on the wikibooks documentation and keep the .gnuhealthrc at $HOME but put config files at other locations.


The usage would be:

./gnuhealth-control backup_attachments --backdir <...> --datadir <...>

./gnuhealth-control backup_database --backdir <...> --database <...>

./gnuhealth-control backup_environment --backdir <...> --database <...>

Where ā€œ./ā€ should be skipped on openSUSE package installation and "su gnuhealth" + "cdutil" should be executed before if using the vanilla installation


Besides Iā€™m also interested in backup approaches people are using apart from using gnuhealth-control if someone likes to share. I thought of using rsnapshot (with SSH) for the attachments folder and doing the database backup as postgres user or with sudo in order to include config files as well.


Best

Gerald

On 31.03.22 15:12, Gerald Wiese wrote:
URL:
  <https://savannah.gnu.org/task/?16142>

                 Summary: improve gnuhealth-control backup & restore
                 Project: GNU Health
            Submitted by: gerald_wiese
            Submitted on: Thu 31 Mar 2022 01:12:50 PM UTC
         Should Start On: Thu 31 Mar 2022 12:00:00 AM UTC
   Should be Finished on: Sun 01 May 2022 12:00:00 AM UTC
                Category: None
                Priority: 5 - Normal
                  Status: In Progress
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
                 Release: None
         Discussion Lock: Any
                  Module: health

    _______________________________________________________

Details:

How to improve backups & restore in gnuhealth-control command?

Backup application for restore:
    - attachments
    - config files
    - systemd service file
    - .gnuhealthrc bash environment
    - list of activated modules
Backup application for debugging if restore fails:
    - OS version
    - GH version
    - Tryton version
    - pip freeze

Backup PostgreSQL: A dump is saved but a backup as postgres/root could be more
appropriate in order to save config files as well that are not world-readable

Any further thoughts on this?




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/task/?16142>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/

Attachment: gnuhealth-control
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]