1.1 --- a/vcs-backup.sh Sun Apr 21 21:49:50 2019 +0200
1.2 +++ b/vcs-backup.sh Sun Apr 21 21:57:46 2019 +0200
1.3 @@ -32,6 +32,8 @@
1.4
1.5
1.6 # This is an asynchronous message-driven shell script that runs distributed across two machines and four user accounts. You have been warned :-)
1.7 +
1.8 +
1.9 # Server-side configuration:
1.10 VCS_BACKUP_DATA_DIR="/mnt/data";
1.11 VCS_BACKUP_CURRENT_DIR="$VCS_BACKUP_DATA_DIR/current";
1.12 @@ -204,9 +206,9 @@
1.13 # Environment: server
1.14 # User: $VCS_BACKUP_MANAGER
1.15 vcs_backup_public_serverListRepositories() {
1.16 - echo "%rec: repositories";
1.17 - echo "%type: bytes int";
1.18 - echo "%type: public bool";
1.19 + printRecfileKeyValue "%rec" "repositories";
1.20 + printRecfileKeyValue "%type" "bytes int";
1.21 + printRecfileKeyValue "%type" "public bool";
1.22 echo;
1.23
1.24 find "$VCS_BACKUP_CONFIG_DIR" -name url.txt -printf '%P\n' | sort | xargs dirname | while read d; do
1.25 @@ -235,11 +237,11 @@
1.26 # User: $VCS_BACKUP_USER
1.27 # should be called from cron (usually every day)
1.28 vcs_backup_public_serverPullCronTask() {
1.29 - echo "%rec: pull";
1.30 - echo "%type: started date";
1.31 - echo "%type: finished date";
1.32 - echo "%type: duration int";
1.33 - echo "%type: resultCode int";
1.34 + printRecfileKeyValue "%rec" "pull";
1.35 + printRecfileKeyValue "%type" "started date";
1.36 + printRecfileKeyValue "%type" "finished date";
1.37 + printRecfileKeyValue "%type" "duration int";
1.38 + printRecfileKeyValue "%type" "resultCode int";
1.39
1.40 find "$VCS_BACKUP_CONFIG_DIR" -name url.txt -printf '%P\n' | sort | xargs dirname | while read d; do
1.41 state=$(cat "$VCS_BACKUP_CONFIG_DIR/$d/state.txt");