)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"25a3db2a3076a12c197ec25bb023c228f7c79a4e","unresolved":true,"context_lines":[{"line_number":18,"context_line":"When we are sure we don\u0027t want the data, we can put it in the purge"},{"line_number":19,"context_line":"list, and the backup repo is removed on the next ansible run (hosts"},{"line_number":20,"context_line":"can go straight into this if we want).  This allows us to have a"},{"line_number":21,"context_line":"review process/history before we purge data."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"To test, we create a fake \"borg-retired\" user on the backup-server,"},{"line_number":24,"context_line":"and give it a simple backup.  This is marked as retired, which is"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"e4c66da2_2030cc55","line":21,"updated":"2024-11-05 21:10:57.000000000","message":"I like this particularly the record keeping. It is worth noting that we\u0027ll retire/purge on all the backup servers at once so we should be extra sure we are ready but that should be fine.","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"c055bff83e33778346795551f5db2e1061e4b3b7","unresolved":false,"context_lines":[{"line_number":18,"context_line":"When we are sure we don\u0027t want the data, we can put it in the purge"},{"line_number":19,"context_line":"list, and the backup repo is removed on the next ansible run (hosts"},{"line_number":20,"context_line":"can go straight into this if we want).  This allows us to have a"},{"line_number":21,"context_line":"review process/history before we purge data."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"To test, we create a fake \"borg-retired\" user on the backup-server,"},{"line_number":24,"context_line":"and give it a simple backup.  This is marked as retired, which is"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"ae7a3c79_893140bc","line":21,"in_reply_to":"e4c66da2_2030cc55","updated":"2024-11-07 19:30:29.000000000","message":"Done","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"25a3db2a3076a12c197ec25bb023c228f7c79a4e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"927d0c44_d56a6823","updated":"2024-11-05 21:10:57.000000000","message":"recheck the test failure had to do with ssh host keys changing...","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"f955a06007df417c02dd29030f1525e6643eda66","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":23,"id":"c588f912_bfcca6d7","updated":"2024-11-12 15:47:59.000000000","message":"The backup verifier script needs an update too. I\u0027ll push that as a followup change to this one. (The verifier is already complaining about ethercalc02 and I broke that so I\u0027ll fix it).","commit_id":"8361ab701ccce10fe5bfb5901252a6470f23753f"}],"playbooks/roles/borg-backup-server/defaults/main.yaml":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"25a3db2a3076a12c197ec25bb023c228f7c79a4e","unresolved":true,"context_lines":[{"line_number":1,"context_line":"borg_users: []"},{"line_number":2,"context_line":"borg_purge_users: []"},{"line_number":3,"context_line":"borg_retire_users: []"}],"source_content_type":"text/x-yaml","patch_set":21,"id":"e2c0f8de_396d52e3","line":3,"updated":"2024-11-05 21:10:57.000000000","message":"Nit, maybe retire_users should go first so that the movement from retire_users to purge_users is ordered in this file too? (this is a super minor nit).","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"f955a06007df417c02dd29030f1525e6643eda66","unresolved":false,"context_lines":[{"line_number":1,"context_line":"borg_users: []"},{"line_number":2,"context_line":"borg_purge_users: []"},{"line_number":3,"context_line":"borg_retire_users: []"}],"source_content_type":"text/x-yaml","patch_set":21,"id":"efbe2beb_d0e06428","line":3,"in_reply_to":"e2c0f8de_396d52e3","updated":"2024-11-12 15:47:59.000000000","message":"Done","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"}],"playbooks/roles/borg-backup-server/files/prune-borg-backups.sh":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"25a3db2a3076a12c197ec25bb023c228f7c79a4e","unresolved":true,"context_lines":[{"line_number":10,"context_line":"    BORG_OP\u003d\u0027--dry-run\u0027"},{"line_number":11,"context_line":"elif [[ ${borg_op} \u003d\u003d \u0027prune\u0027 ]]; then"},{"line_number":12,"context_line":"    BORG_OP\u003d\u0027\u0027"},{"line_number":13,"context_line":"    if [ -z ${NO_LOG_FILE+x} ]; then"},{"line_number":14,"context_line":"        LOG_FILE\u003d\"/opt/backups/prune-$(date \u0027+%Y-%m-%d-%H-%M-%S\u0027).log\""},{"line_number":15,"context_line":"        echo \"*** Logging output to ${LOG_FILE}\""},{"line_number":16,"context_line":"        exec 1\u003e${LOG_FILE}"}],"source_content_type":"text/x-sh","patch_set":21,"id":"32204ba1_307b376e","line":13,"range":{"start_line":13,"start_character":25,"end_line":13,"end_character":27},"updated":"2024-11-05 21:10:57.000000000","message":"This is a new bashism to me. I guess this is an alternative to quoting the variable?","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"76189df82c2cd69cebdfe73248874c152f417437","unresolved":true,"context_lines":[{"line_number":10,"context_line":"    BORG_OP\u003d\u0027--dry-run\u0027"},{"line_number":11,"context_line":"elif [[ ${borg_op} \u003d\u003d \u0027prune\u0027 ]]; then"},{"line_number":12,"context_line":"    BORG_OP\u003d\u0027\u0027"},{"line_number":13,"context_line":"    if [ -z ${NO_LOG_FILE+x} ]; then"},{"line_number":14,"context_line":"        LOG_FILE\u003d\"/opt/backups/prune-$(date \u0027+%Y-%m-%d-%H-%M-%S\u0027).log\""},{"line_number":15,"context_line":"        echo \"*** Logging output to ${LOG_FILE}\""},{"line_number":16,"context_line":"        exec 1\u003e${LOG_FILE}"}],"source_content_type":"text/x-sh","patch_set":21,"id":"c17c8bde_447e8ad0","line":13,"range":{"start_line":13,"start_character":25,"end_line":13,"end_character":27},"in_reply_to":"32204ba1_307b376e","updated":"2024-11-05 21:38:46.000000000","message":"From the bash manpage I see:\n\n```\n       ${parameter:+word}\n              Use Alternate Value.  If parameter is null or unset, nothing is substituted, otherwise the expansion of word is substituted.\n\n```\n\nThis mimics the behavior I see for this line in manual testing but without the `:`. I guess the : is optional?","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"c055bff83e33778346795551f5db2e1061e4b3b7","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    BORG_OP\u003d\u0027--dry-run\u0027"},{"line_number":11,"context_line":"elif [[ ${borg_op} \u003d\u003d \u0027prune\u0027 ]]; then"},{"line_number":12,"context_line":"    BORG_OP\u003d\u0027\u0027"},{"line_number":13,"context_line":"    if [ -z ${NO_LOG_FILE+x} ]; then"},{"line_number":14,"context_line":"        LOG_FILE\u003d\"/opt/backups/prune-$(date \u0027+%Y-%m-%d-%H-%M-%S\u0027).log\""},{"line_number":15,"context_line":"        echo \"*** Logging output to ${LOG_FILE}\""},{"line_number":16,"context_line":"        exec 1\u003e${LOG_FILE}"}],"source_content_type":"text/x-sh","patch_set":21,"id":"c544482a_e2f56804","line":13,"range":{"start_line":13,"start_character":25,"end_line":13,"end_character":27},"in_reply_to":"7ba3052b_001386ad","updated":"2024-11-07 19:30:29.000000000","message":"Done","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"2c4c6025cca96fd9ff3acf49efb9775b040f3e1e","unresolved":true,"context_lines":[{"line_number":10,"context_line":"    BORG_OP\u003d\u0027--dry-run\u0027"},{"line_number":11,"context_line":"elif [[ ${borg_op} \u003d\u003d \u0027prune\u0027 ]]; then"},{"line_number":12,"context_line":"    BORG_OP\u003d\u0027\u0027"},{"line_number":13,"context_line":"    if [ -z ${NO_LOG_FILE+x} ]; then"},{"line_number":14,"context_line":"        LOG_FILE\u003d\"/opt/backups/prune-$(date \u0027+%Y-%m-%d-%H-%M-%S\u0027).log\""},{"line_number":15,"context_line":"        echo \"*** Logging output to ${LOG_FILE}\""},{"line_number":16,"context_line":"        exec 1\u003e${LOG_FILE}"}],"source_content_type":"text/x-sh","patch_set":21,"id":"7ba3052b_001386ad","line":13,"range":{"start_line":13,"start_character":25,"end_line":13,"end_character":27},"in_reply_to":"c17c8bde_447e8ad0","updated":"2024-11-05 21:40:24.000000000","message":"Ok figured it out:\n\n```\nbash tests for a parameter that is unset or null.  Omitting the colon results in a test only for a parameter that  is unset.\n```","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"4f62fb359865acac6e0584118b0ad10969834d69","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    for prefix in ${archives};"},{"line_number":52,"context_line":"    do"},{"line_number":53,"context_line":"       echo \"| $(date) - archive ${prefix}\""},{"line_number":54,"context_line":"      /opt/borg/bin/borg prune --prefix ${prefix} ${BORG_OP} --verbose --list --show-rc ${_prune_flags}"},{"line_number":55,"context_line":"    done"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-sh","patch_set":23,"id":"d7ef7321_3e6ffb6c","line":53,"updated":"2024-11-12 21:33:50.000000000","message":"Nit: Looks like we increased indentation here slightly.","commit_id":"8361ab701ccce10fe5bfb5901252a6470f23753f"}],"playbooks/roles/borg-backup-server/tasks/main.yaml":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"25a3db2a3076a12c197ec25bb023c228f7c79a4e","unresolved":true,"context_lines":[{"line_number":69,"context_line":"  file:"},{"line_number":70,"context_line":"    name: \u0027/opt/backups/{{ item }}\u0027"},{"line_number":71,"context_line":"    state: absent"},{"line_number":72,"context_line":"  loop: \u0027{{ borg_purge_users }}\u0027"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"- name: Disable retired users"},{"line_number":75,"context_line":"  include_tasks: retire.yaml"}],"source_content_type":"text/x-yaml","patch_set":21,"id":"8808a9c5_9b684037","line":72,"updated":"2024-11-05 21:10:57.000000000","message":"When I did the manual equivalent of this I kept the top level user dir around as it is the homedir in /etc/passwd for these users and we don\u0027t want to remove the user to avoid uid/gid collisions etc. Is it ok to delete the homedir entirely? Or should we just delete the backup dir in the homedir then update the prune script to skip over repos without a backup dir in it?","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"f955a06007df417c02dd29030f1525e6643eda66","unresolved":false,"context_lines":[{"line_number":69,"context_line":"  file:"},{"line_number":70,"context_line":"    name: \u0027/opt/backups/{{ item }}\u0027"},{"line_number":71,"context_line":"    state: absent"},{"line_number":72,"context_line":"  loop: \u0027{{ borg_purge_users }}\u0027"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"- name: Disable retired users"},{"line_number":75,"context_line":"  include_tasks: retire.yaml"}],"source_content_type":"text/x-yaml","patch_set":21,"id":"e8dc1446_70b0b014","line":72,"in_reply_to":"8808a9c5_9b684037","updated":"2024-11-12 15:47:59.000000000","message":"Done","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"}],"playbooks/test-borg-backup-pre.yaml":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"25a3db2a3076a12c197ec25bb023c228f7c79a4e","unresolved":true,"context_lines":[{"line_number":15,"context_line":"        name: borg-retired"},{"line_number":16,"context_line":"        home: \u0027/opt/backups/borg-retired\u0027"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    # We put \"purge_backup_user\" in borg_purge_users and check that"},{"line_number":19,"context_line":"    # this directory gets removed."},{"line_number":20,"context_line":"    - name: Setup fake purge user directory"},{"line_number":21,"context_line":"      file:"}],"source_content_type":"text/x-yaml","patch_set":21,"id":"ee602bf1_fb87bf54","line":18,"range":{"start_line":18,"start_character":14,"end_line":18,"end_character":31},"updated":"2024-11-05 21:10:57.000000000","message":"Nit it should be `borg-purge` based on the file name below.","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"f955a06007df417c02dd29030f1525e6643eda66","unresolved":false,"context_lines":[{"line_number":15,"context_line":"        name: borg-retired"},{"line_number":16,"context_line":"        home: \u0027/opt/backups/borg-retired\u0027"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    # We put \"purge_backup_user\" in borg_purge_users and check that"},{"line_number":19,"context_line":"    # this directory gets removed."},{"line_number":20,"context_line":"    - name: Setup fake purge user directory"},{"line_number":21,"context_line":"      file:"}],"source_content_type":"text/x-yaml","patch_set":21,"id":"a0bc3ac2_f387a64e","line":18,"range":{"start_line":18,"start_character":14,"end_line":18,"end_character":31},"in_reply_to":"ee602bf1_fb87bf54","updated":"2024-11-12 15:47:59.000000000","message":"Done","commit_id":"56fbbd7d47b7b36ba8ff05957bb30b7b9522827d"}]}
