27.2. backup_gen
I have included backup_gen not because it shows how to back up directories, but because it is a good example of how to share common settings amongst other scripts.
The backup_gen is a backup script that reads in a default configuration file which is then used for a backup of the system. A user can alter the default settings if he or she wishes. This script is a good example of how different scripts can use the same settings or change them just for the script’s run time. When the script executes, it makes sure the source file (backup.defaults) is present. The script will exit if it cannot be found.
A screen header and the default settings are displayed. The user is asked if he or she wants to change any of the default settings. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access