WIP: Extract functions for local tasks #65

Draft
jlecour wants to merge 99 commits from client-functions into master
Owner

Hi,

This PR intersects 2 differents goals :

  1. improving the maintainability of the backup script ;
  2. improving the reliability and ability to report the status of the various tasks.

I have extracted the "dump" tasks into dedicated functions.

  1. It helps enabling/disabling them in the local_tasks function, by having a single line comment to add/remove.
  2. It clarifies the list of enabled dump tasks in the local_tasks function.
  3. Having dedicated functions helps future upgrades of the script and/or those functions, thanks to clear boundaries between code sections.
  4. It doesn't reduce the ability to customize those tasks.
  5. It helps having some "support" code, like dealing with dump directories, temporary error files, error management…
  6. each local task has its own "dump directory" with clear names…
  7. a log file containing the Rsync stats is pushed after the main Rsync command (alongside the canary file), to help seeing what has been transferred directly on the backer server.
  8. an mtree is done for each top-level directory and sent to the backup server, for future comparisions

A question remains:

Should we limit the output of the script to errors, or give every step, or keep the last lines of the log file?

Hi, This PR intersects 2 differents goals : 1. improving the maintainability of the backup script ; 2. improving the reliability and ability to report the status of the various tasks. I have extracted the "dump" tasks into dedicated functions. 1. It helps enabling/disabling them in the `local_tasks` function, by having a single line comment to add/remove. 2. It clarifies the list of enabled dump tasks in the `local_tasks` function. 3. Having dedicated functions helps future upgrades of the script and/or those functions, thanks to clear boundaries between code sections. 4. It doesn't reduce the ability to customize those tasks. 5. It helps having some "support" code, like dealing with dump directories, temporary error files, error management… 6. each local task has its own "dump directory" with clear names… 7. a log file containing the Rsync stats is pushed after the main Rsync command (alongside the canary file), to help seeing what has been transferred directly on the backer server. 8. an `mtree` is done for each top-level directory and sent to the backup server, for future comparisions A question remains: Should we limit the output of the script to errors, or give every step, or keep the last lines of the log file?
jlecour added 1 commit 2023-01-02 14:14:14 +01:00
gitea/evobackup/pipeline/head This commit looks good Details
cb5c842979
Extract functions for each local task
jlecour added 1 commit 2023-01-03 09:59:18 +01:00
jlecour added 1 commit 2023-01-03 23:30:56 +01:00
jlecour force-pushed client-functions from c50ef31ddd to e3c7da32a9 2023-01-03 23:34:58 +01:00 Compare
jlecour added 1 commit 2023-01-03 23:50:28 +01:00
jlecour added 1 commit 2023-01-03 23:50:39 +01:00
jlecour force-pushed client-functions from cb69588c92 to c6a89cbc32 2023-01-04 07:35:34 +01:00 Compare
jlecour added 1 commit 2023-01-04 07:45:53 +01:00
jlecour added 4 commits 2023-01-04 09:16:05 +01:00
jlecour added 1 commit 2023-01-04 09:19:53 +01:00
jlecour added 1 commit 2023-01-04 09:20:47 +01:00
jlecour added 1 commit 2023-01-04 09:40:32 +01:00
jlecour added 1 commit 2023-01-04 11:34:47 +01:00
jlecour added 1 commit 2023-01-04 13:54:31 +01:00
jlecour added 2 commits 2023-01-04 14:20:16 +01:00
jlecour added 1 commit 2023-01-04 14:51:15 +01:00
jlecour added 1 commit 2023-01-04 23:32:25 +01:00
jlecour added 1 commit 2023-01-05 13:45:23 +01:00
jlecour added 2 commits 2023-01-06 14:42:09 +01:00
jlecour added 1 commit 2023-01-06 14:45:06 +01:00
jlecour added 1 commit 2023-01-06 16:59:15 +01:00
jlecour added 1 commit 2023-01-09 11:45:42 +01:00
jlecour added 1 commit 2023-01-13 11:17:28 +01:00
jlecour added 2 commits 2023-01-13 11:34:24 +01:00
jlecour added 1 commit 2023-01-13 15:39:13 +01:00
jlecour added 3 commits 2023-01-13 17:17:06 +01:00
jlecour force-pushed client-functions from d896f9d8de to f07d39a074 2023-01-13 17:17:46 +01:00 Compare
jlecour force-pushed client-functions from f07d39a074 to 518fa9d1e7 2023-01-13 17:18:06 +01:00 Compare
jlecour added 2 commits 2023-01-15 22:55:42 +01:00
jlecour added 21 commits 2023-03-22 14:46:41 +01:00
gitea/evobackup/pipeline/head This commit looks good Details
2ea9614e3c
WIP: separate lib and custom code
gitea/evobackup/pipeline/head This commit looks good Details
7784ba5548
load libraries just before calling main
gitea/evobackup/pipeline/head This commit looks good Details
c5d82eda68
deployment playbook
gitea/evobackup/pipeline/head This commit looks good Details
70fbab9bb0
Test presence of old config file before trying to delete it
gitea/evobackup/pipeline/head This commit looks good Details
d532ac83da
client: declare variable earlier
gitea/evobackup/pipeline/head This commit looks good Details
149b5d0e8d
comments
gitea/evobackup/pipeline/head This commit looks good Details
50f81f2716
Add options for dump functions
gitea/evobackup/pipeline/head This commit looks good Details
feafe01692
Delete error directories recursively
4475ee9af8 dump.sh: improve options handling
* default values,
* reset variable each time
* option masterdata seulement si présente
gitea/evobackup/pipeline/head This commit looks good Details
70e541dd6d
zzz_evobackup.sh: LIBDIR="/usr/local/lib/evobackup"
gitea/evobackup/pipeline/head This commit looks good Details
a6573c6db3
changelog
gitea/evobackup/pipeline/head This commit looks good Details
5ac990473e
remove monolithic script
Author
Owner

I have merged the "split-lib" branch.

Now functions are extracted in dedicated library files.

I have merged the "split-lib" branch. Now functions are extracted in dedicated library files.
jlecour added 1 commit 2023-03-22 22:06:30 +01:00
jlecour added 1 commit 2023-03-23 07:48:51 +01:00
jlecour added 2 commits 2023-03-23 08:47:43 +01:00
jlecour added 1 commit 2023-03-31 17:27:25 +02:00
jlecour added 3 commits 2023-07-06 09:12:10 +02:00
jlecour added 1 commit 2023-07-06 09:12:41 +02:00
jlecour added 1 commit 2023-07-06 09:42:49 +02:00
jlecour added 1 commit 2023-07-06 09:47:49 +02:00
jlecour added 2 commits 2023-07-06 10:26:10 +02:00
68daa1ebf2
deploy-evobackup-beta : fix various issues
* bad permissions
* hard-coded path for cron job
* Ansible syntax for booleans
jlecour added 2 commits 2023-11-23 09:03:40 +01:00
jlecour added 1 commit 2023-12-28 15:24:00 +01:00
jlecour added 3 commits 2023-12-29 13:52:19 +01:00
jlecour added 1 commit 2023-12-29 14:05:10 +01:00
jlecour added 4 commits 2023-12-29 18:15:49 +01:00
jlecour added 1 commit 2023-12-29 18:24:38 +01:00
jlecour added 1 commit 2023-12-29 18:26:17 +01:00
jlecour added 1 commit 2024-01-02 12:12:18 +01:00
jlecour added 4 commits 2024-01-09 08:48:05 +01:00
jlecour added 1 commit 2024-01-09 10:11:42 +01:00
jlecour added 2 commits 2024-01-09 11:24:12 +01:00
jlecour added 1 commit 2024-01-09 13:31:14 +01:00
jlecour added 2 commits 2024-01-10 15:06:37 +01:00
jlecour added 1 commit 2024-01-11 08:03:20 +01:00
jlecour added 1 commit 2024-01-15 07:35:44 +01:00
jlecour force-pushed client-functions from 9c96d9a511 to da1d4356dd 2024-01-26 16:04:10 +01:00 Compare
jlecour added 1 commit 2024-03-22 11:32:30 +01:00
jlecour added 1 commit 2024-04-08 13:15:32 +02:00
This pull request has changes conflicting with the target branch.
  • client/README.md
  • client/zzz_evobackup
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b client-functions master
git pull origin client-functions

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff client-functions
git push origin master
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: evolix/evobackup#65
No description provided.