WIP: Extract functions for local tasks #65
This PR intersects 2 differents goals :
- improving the maintainability of the backup script ;
- improving the reliability and ability to report the status of the various tasks.
I have extracted the "dump" tasks into dedicated functions.
- It helps enabling/disabling them in the
local_tasksfunction, by having a single line comment to add/remove.
- It clarifies the list of enabled dump tasks in the
- Having dedicated functions helps future upgrades of the script and/or those functions, thanks to clear boundaries between code sections.
- It doesn't reduce the ability to customize those tasks.
- It helps having some "support" code, like dealing with dump directories, temporary error files, error management…
- each local task has its own "dump directory" with clear names…
- 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.
mtreeis 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?
* default values, * reset variable each time * option masterdata seulement si présente
I have merged the "split-lib" branch.
Now functions are extracted in dedicated library files.
Step 1:From your project repository, check out a new branch and test the changes.
Step 2:Merge the changes and update on Gitea.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?