|
17 | 17 | #include<sys/stat.h> |
18 | 18 | #include<unistd.h> |
19 | 19 |
|
20 | | -constchar*PROGRAM_VERSION="1.1.17"; |
| 20 | +constchar*PROGRAM_VERSION="2.0.0"; |
21 | 21 | constchar*PROGRAM_URL="https://github.com/postgrespro/pg_probackup"; |
22 | 22 | constchar*PROGRAM_EMAIL="https://github.com/postgrespro/pg_probackup/issues"; |
23 | 23 |
|
@@ -72,6 +72,7 @@ uint32retention_window = 0; |
72 | 72 | /* compression options */ |
73 | 73 | CompressAlgcompress_alg=NOT_DEFINED_COMPRESS; |
74 | 74 | intcompress_level=DEFAULT_COMPRESS_LEVEL; |
| 75 | +boolcompress_shortcut= false; |
75 | 76 |
|
76 | 77 | /* other options */ |
77 | 78 | char*instance_name; |
@@ -132,6 +133,7 @@ static pgut_option options[] = |
132 | 133 | /* compression options */ |
133 | 134 | {'f',36,"compress-algorithm",opt_compress_alg,SOURCE_CMDLINE }, |
134 | 135 | {'u',37,"compress-level",&compress_level,SOURCE_CMDLINE }, |
| 136 | +{'b',38,"compress",&compress_shortcut,SOURCE_CMDLINE }, |
135 | 137 | /* logging options */ |
136 | 138 | {'f',40,"log-level",opt_log_level,SOURCE_CMDLINE }, |
137 | 139 | {'s',41,"log-filename",&log_filename,SOURCE_CMDLINE }, |
@@ -353,6 +355,9 @@ main(int argc, char *argv[]) |
353 | 355 | if (num_threads<1) |
354 | 356 | num_threads=1; |
355 | 357 |
|
| 358 | +if (compress_shortcut) |
| 359 | +compress_alg=ZLIB_COMPRESS; |
| 360 | + |
356 | 361 | if (backup_subcmd!=SET_CONFIG) |
357 | 362 | { |
358 | 363 | if (compress_level!=DEFAULT_COMPRESS_LEVEL |
@@ -405,7 +410,7 @@ main(int argc, char *argv[]) |
405 | 410 | elog(ERROR,"show-config command doesn't accept any options except -B and --instance"); |
406 | 411 | returndo_configure(true); |
407 | 412 | caseSET_CONFIG: |
408 | | -if (argc==5) |
| 413 | +if (argc==6) |
409 | 414 | elog(ERROR,"set-config command requires at least one option"); |
410 | 415 | returndo_configure(false); |
411 | 416 | } |
|