Clarify required versus optional config values #57

Closed
opened 2018-02-18 22:09:11 +00:00 by witten · 1 comment
Owner

When running generate-borgmatic-config, the command generates a giant config file full of both optional and required configuration values. But only two of the values are actually required, and it's not the best first-time user experience to have to wade through most of the values just to end up deleting them or commenting them out.

So as part of this ticket, improve that first-time experience and make it more obvious which values are required.

Implementation ideas

Idea 1:

Make it more explicit in the generated config file comments:

   # VALUE: source_directories:
   # DEFAULT: /etc
   # [REQUIRED] List of source directories to backup. Globs and tildes are expanded.
   source_directories:
        - /etc
        - /var/www/
        - /var/log/
        - /home/user/data files

(Idea from Zach Coffey.)

Idea 2:

Generate the example config file with optional values commented out, so it's clear that you really just need to focus on the commented-in required values.

Idea 3:

Add a flag to generate-borgmatic-config that generates just the minimal config file with only the required values set.

When running `generate-borgmatic-config`, the command generates a giant config file full of both optional and required configuration values. But only two of the values are actually required, and it's not the best first-time user experience to have to wade through most of the values just to end up deleting them or commenting them out. So as part of this ticket, improve that first-time experience and make it more obvious which values are required. **Implementation ideas** Idea 1: Make it more explicit in the generated config file comments: ``` # VALUE: source_directories: # DEFAULT: /etc # [REQUIRED] List of source directories to backup. Globs and tildes are expanded. source_directories: - /etc - /var/www/ - /var/log/ - /home/user/data files ``` (Idea from Zach Coffey.) Idea 2: Generate the example config file with optional values commented out, so it's clear that you really just need to focus on the commented-in required values. Idea 3: Add a flag to `generate-borgmatic-config` that generates just the minimal config file with only the required values set.
Author
Owner

Implemented idea 2 (optional values render as commented out) in borgmatic 1.2.5.

Implemented idea 2 (optional values render as commented out) in borgmatic 1.2.5.
Sign in to join this conversation.
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: borgmatic-collective/borgmatic#57
No description provided.