Skip to content

Commit edbea57

Browse files
chore: add support for restic 0.18
1 parent af9ab7f commit edbea57

2 files changed

Lines changed: 129 additions & 13 deletions

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ generate-restic:
238238
$(RESTIC_GEN) --install $(RESTIC_DIR)0.16.1 --version=0.16.1 --commands $(RESTIC_CMD)
239239
$(RESTIC_GEN) --install $(RESTIC_DIR)0.16.4 --version=0.16.4 --commands $(RESTIC_CMD)
240240
$(RESTIC_GEN) --install $(RESTIC_DIR)0.17.0 --version=0.17.0 --commands $(RESTIC_CMD)
241+
$(RESTIC_GEN) --install $(RESTIC_DIR)0.18.0 --version=0.18.0 --commands $(RESTIC_CMD)
241242

242243
cp $(RESTIC_CMD) restic/commands.json
243244

@@ -250,7 +251,7 @@ generate-jsonschema: build
250251

251252
for config_version in 1 2 ; do \
252253
$(abspath $(BINARY)) generate --json-schema v$$config_version > $(JSONSCHEMA_DIR)/config-$$config_version.json ; \
253-
for restic_version in 0.9 0.10 0.11 0.12 0.13 0.14 0.15 0.16 0.17 ; do \
254+
for restic_version in 0.9 0.10 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 ; do \
254255
name=$$(echo $$restic_version | sed 's/\./-/g') ; \
255256
$(abspath $(BINARY)) generate --json-schema --version $$restic_version v$$config_version > $(JSONSCHEMA_DIR)/config-$$config_version-restic-$$name.json ; \
256257
done ; \

restic/commands.json

Lines changed: 127 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@
383383
"Name": "from-insecure-no-password",
384384
"Alias": "",
385385
"Default": "false",
386-
"Description": "use an empty password for the source repository, must be passed to every restic command (insecure)",
386+
"Description": "use an empty password for the source repository (insecure)",
387387
"Once": true,
388388
"FromVersion": "0.17.0",
389389
"RemovedInVersion": ""
@@ -604,9 +604,26 @@
604604
}
605605
]
606606
},
607+
{
608+
"Name": "features",
609+
"Description": "The \"features\" command prints a list of supported feature flags.\n\nTo pass feature flags to restic, set the RESTIC_FEATURES environment variable\nto \"featureA=true,featureB=false\". Specifying an unknown feature flag is an error.\n\nA feature can either be in alpha, beta, stable or deprecated state.\nAn alpha feature is disabled by default and may change in arbitrary ways between restic versions or be removed.\nA beta feature is enabled by default, but still can change in minor ways or be removed.\nA stable feature is always enabled and cannot be disabled. The flag will be removed in a future restic version.\nA deprecated feature is always disabled and cannot be enabled. The flag will be removed in a future restic version.",
610+
"FromVersion": "0.18.0",
611+
"RemovedInVersion": "",
612+
"Options": [
613+
{
614+
"Name": "help",
615+
"Alias": "h",
616+
"Default": "false",
617+
"Description": "help for features",
618+
"Once": true,
619+
"FromVersion": "0.18.0",
620+
"RemovedInVersion": ""
621+
}
622+
]
623+
},
607624
{
608625
"Name": "find",
609-
"Description": "The \"find\" command searches for files or directories in snapshots stored in the\nrepo.\nIt can also be used to search for restic blobs or trees for troubleshooting.",
626+
"Description": "The \"find\" command searches for files or directories in snapshots stored in the\nrepo.\nIt can also be used to search for restic blobs or trees for troubleshooting.\nThe default sort option for the snapshots is youngest to oldest. To sort the\noutput from oldest to youngest specify --reverse.",
610627
"FromVersion": "",
611628
"RemovedInVersion": "",
612629
"Options": [
@@ -700,6 +717,15 @@
700717
"FromVersion": "",
701718
"RemovedInVersion": ""
702719
},
720+
{
721+
"Name": "reverse",
722+
"Alias": "R",
723+
"Default": "false",
724+
"Description": "reverse sort order oldest to newest",
725+
"Once": true,
726+
"FromVersion": "0.18.0",
727+
"RemovedInVersion": ""
728+
},
703729
{
704730
"Name": "show-pack-id",
705731
"Alias": "",
@@ -910,7 +936,7 @@
910936
"Name": "max-repack-size",
911937
"Alias": "",
912938
"Default": "\"\"",
913-
"Description": "maximum size to repack (allowed suffixes: k/K, m/M, g/G, t/T)",
939+
"Description": "stop after repacking this much data in total (allowed suffixes for size: k/K, m/M, g/G, t/T)",
914940
"Once": true,
915941
"FromVersion": "0.12.0",
916942
"RemovedInVersion": ""
@@ -960,6 +986,15 @@
960986
"FromVersion": "0.14.0",
961987
"RemovedInVersion": ""
962988
},
989+
{
990+
"Name": "repack-smaller-than",
991+
"Alias": "",
992+
"Default": "\"\"",
993+
"Description": "pack below-limit packfiles (allowed suffixes: k/K, m/M)",
994+
"Once": true,
995+
"FromVersion": "0.18.0",
996+
"RemovedInVersion": ""
997+
},
963998
{
964999
"Name": "repack-uncompressed",
9651000
"Alias": "",
@@ -999,7 +1034,7 @@
9991034
"Name": "bash-completion",
10001035
"Alias": "",
10011036
"Default": "\"\"",
1002-
"Description": "write bash completion file",
1037+
"Description": "write bash completion file (- for stdout)",
10031038
"Once": true,
10041039
"FromVersion": "",
10051040
"RemovedInVersion": ""
@@ -1008,7 +1043,7 @@
10081043
"Name": "fish-completion",
10091044
"Alias": "",
10101045
"Default": "\"\"",
1011-
"Description": "write fish completion file",
1046+
"Description": "write fish completion file (- for stdout)",
10121047
"Once": true,
10131048
"FromVersion": "0.13.0",
10141049
"RemovedInVersion": ""
@@ -1035,7 +1070,7 @@
10351070
"Name": "powershell-completion",
10361071
"Alias": "",
10371072
"Default": "\"\"",
1038-
"Description": "write powershell completion file",
1073+
"Description": "write powershell completion file (- for stdout)",
10391074
"Once": true,
10401075
"FromVersion": "0.15.0",
10411076
"RemovedInVersion": ""
@@ -1044,7 +1079,7 @@
10441079
"Name": "zsh-completion",
10451080
"Alias": "",
10461081
"Default": "\"\"",
1047-
"Description": "write zsh completion file",
1082+
"Description": "write zsh completion file (- for stdout)",
10481083
"Once": true,
10491084
"FromVersion": "",
10501085
"RemovedInVersion": ""
@@ -1070,7 +1105,7 @@
10701105
"Name": "from-insecure-no-password",
10711106
"Alias": "",
10721107
"Default": "false",
1073-
"Description": "use an empty password for the source repository, must be passed to every restic command (insecure)",
1108+
"Description": "use an empty password for the source repository (insecure)",
10741109
"Once": true,
10751110
"FromVersion": "0.17.0",
10761111
"RemovedInVersion": ""
@@ -1388,7 +1423,7 @@
13881423
},
13891424
{
13901425
"Name": "ls",
1391-
"Description": "The \"ls\" command lists files and directories in a snapshot.\n\nThe special snapshot ID \"latest\" can be used to list files and\ndirectories of the latest snapshot in the repository. The\n--host flag can be used in conjunction to select the latest\nsnapshot originating from a certain host only.\n\nFile listings can optionally be filtered by directories. Any\npositional arguments after the snapshot ID are interpreted as\nabsolute directory paths, and only files inside those directories\nwill be listed. If the --recursive flag is used, then the filter\nwill allow traversing into matching directories' subfolders.\nAny directory paths specified must be absolute (starting with\na path separator); paths use the forward slash '/' as separator.",
1426+
"Description": "The \"ls\" command lists files and directories in a snapshot.\n\nThe special snapshot ID \"latest\" can be used to list files and\ndirectories of the latest snapshot in the repository. The\n--host flag can be used in conjunction to select the latest\nsnapshot originating from a certain host only.\n\nFile listings can optionally be filtered by directories. Any\npositional arguments after the snapshot ID are interpreted as\nabsolute directory paths, and only files inside those directories\nwill be listed. If the --recursive flag is used, then the filter\nwill allow traversing into matching directories' subfolders.\nAny directory paths specified must be absolute (starting with\na path separator); paths use the forward slash '/' as separator.\n\nFile listings can be sorted by specifying --sort followed by one of the\nsort specifiers '(name|size|time=mtime|atime|ctime|extension)'.\nThe sorting can be reversed by specifying --reverse.",
13921427
"FromVersion": "",
13931428
"RemovedInVersion": "",
13941429
"Options": [
@@ -1455,6 +1490,24 @@
14551490
"FromVersion": "",
14561491
"RemovedInVersion": ""
14571492
},
1493+
{
1494+
"Name": "reverse",
1495+
"Alias": "",
1496+
"Default": "false",
1497+
"Description": "reverse sorted output",
1498+
"Once": true,
1499+
"FromVersion": "0.18.0",
1500+
"RemovedInVersion": ""
1501+
},
1502+
{
1503+
"Name": "sort",
1504+
"Alias": "s",
1505+
"Default": "name",
1506+
"Description": "sort output by (name|size|time=mtime|atime|ctime|extension)",
1507+
"Once": true,
1508+
"FromVersion": "0.18.0",
1509+
"RemovedInVersion": ""
1510+
},
14581511
{
14591512
"Name": "tag",
14601513
"Alias": "",
@@ -1599,6 +1652,23 @@
15991652
}
16001653
]
16011654
},
1655+
{
1656+
"Name": "options",
1657+
"Description": "The \"options\" command prints a list of extended options.",
1658+
"FromVersion": "0.18.0",
1659+
"RemovedInVersion": "",
1660+
"Options": [
1661+
{
1662+
"Name": "help",
1663+
"Alias": "h",
1664+
"Default": "false",
1665+
"Description": "help for options",
1666+
"Once": true,
1667+
"FromVersion": "0.18.0",
1668+
"RemovedInVersion": ""
1669+
}
1670+
]
1671+
},
16021672
{
16031673
"Name": "prune",
16041674
"Description": "The \"prune\" command checks the repository and removes data that is not\nreferenced and therefore not needed any more.",
@@ -1627,7 +1697,7 @@
16271697
"Name": "max-repack-size",
16281698
"Alias": "",
16291699
"Default": "\"\"",
1630-
"Description": "maximum size to repack (allowed suffixes: k/K, m/M, g/G, t/T)",
1700+
"Description": "stop after repacking this much data in total (allowed suffixes for size: k/K, m/M, g/G, t/T)",
16311701
"Once": true,
16321702
"FromVersion": "0.12.0",
16331703
"RemovedInVersion": ""
@@ -1659,6 +1729,15 @@
16591729
"FromVersion": "0.14.0",
16601730
"RemovedInVersion": ""
16611731
},
1732+
{
1733+
"Name": "repack-smaller-than",
1734+
"Alias": "",
1735+
"Default": "\"\"",
1736+
"Description": "pack below-limit packfiles (allowed suffixes: k/K, m/M)",
1737+
"Once": true,
1738+
"FromVersion": "0.18.0",
1739+
"RemovedInVersion": ""
1740+
},
16621741
{
16631742
"Name": "repack-uncompressed",
16641743
"Alias": "",
@@ -1886,6 +1965,15 @@
18861965
"FromVersion": "0.17.0",
18871966
"RemovedInVersion": ""
18881967
},
1968+
{
1969+
"Name": "exclude-xattr",
1970+
"Alias": "",
1971+
"Default": "",
1972+
"Description": "exclude xattr by pattern (can be specified multiple times)",
1973+
"Once": false,
1974+
"FromVersion": "0.18.0",
1975+
"RemovedInVersion": ""
1976+
},
18891977
{
18901978
"Name": "help",
18911979
"Alias": "h",
@@ -1958,11 +2046,20 @@
19582046
"FromVersion": "0.17.0",
19592047
"RemovedInVersion": ""
19602048
},
2049+
{
2050+
"Name": "include-xattr",
2051+
"Alias": "",
2052+
"Default": "",
2053+
"Description": "include xattr by pattern (can be specified multiple times)",
2054+
"Once": false,
2055+
"FromVersion": "0.18.0",
2056+
"RemovedInVersion": ""
2057+
},
19612058
{
19622059
"Name": "overwrite",
19632060
"Alias": "",
19642061
"Default": "always",
1965-
"Description": "overwrite behavior, one of (always|if-changed|if-newer|never) (default: always)",
2062+
"Description": "overwrite behavior, one of (always|if-changed|if-newer|never)",
19662063
"Once": true,
19672064
"FromVersion": "0.17.0",
19682065
"RemovedInVersion": ""
@@ -2016,7 +2113,7 @@
20162113
},
20172114
{
20182115
"Name": "rewrite",
2019-
"Description": "The \"rewrite\" command excludes files from existing snapshots. It creates new\nsnapshots containing the same data as the original ones, but without the files\nyou specify to exclude. All metadata (time, host, tags) will be preserved.\n\nThe snapshots to rewrite are specified using the --host, --tag and --path options,\nor by providing a list of snapshot IDs. Please note that specifying neither any of\nthese options nor a snapshot ID will cause the command to rewrite all snapshots.\n\nThe special tag 'rewrite' will be added to the new snapshots to distinguish\nthem from the original ones, unless --forget is used. If the --forget option is\nused, the original snapshots will instead be directly removed from the repository.\n\nPlease note that the --forget option only removes the snapshots and not the actual\ndata stored in the repository. In order to delete the no longer referenced data,\nuse the \"prune\" command.",
2116+
"Description": "The \"rewrite\" command excludes files from existing snapshots. It creates new\nsnapshots containing the same data as the original ones, but without the files\nyou specify to exclude. All metadata (time, host, tags) will be preserved.\n\nThe snapshots to rewrite are specified using the --host, --tag and --path options,\nor by providing a list of snapshot IDs. Please note that specifying neither any of\nthese options nor a snapshot ID will cause the command to rewrite all snapshots.\n\nThe special tag 'rewrite' will be added to the new snapshots to distinguish\nthem from the original ones, unless --forget is used. If the --forget option is\nused, the original snapshots will instead be directly removed from the repository.\n\nPlease note that the --forget option only removes the snapshots and not the actual\ndata stored in the repository. In order to delete the no longer referenced data,\nuse the \"prune\" command.\n\nWhen rewrite is used with the --snapshot-summary option, a new snapshot is\ncreated containing statistics summary data. Only two fields in the summary will\nbe non-zero: TotalFilesProcessed and TotalBytesProcessed.\n\nWhen rewrite is called with one of the --exclude options, TotalFilesProcessed\nand TotalBytesProcessed will be updated in the snapshot summary.",
20202117
"FromVersion": "0.15.0",
20212118
"RemovedInVersion": "",
20222119
"Options": [
@@ -2119,6 +2216,15 @@
21192216
"FromVersion": "0.15.0",
21202217
"RemovedInVersion": ""
21212218
},
2219+
{
2220+
"Name": "snapshot-summary",
2221+
"Alias": "s",
2222+
"Default": "false",
2223+
"Description": "create snapshot summary record if it does not exist",
2224+
"Once": true,
2225+
"FromVersion": "0.18.0",
2226+
"RemovedInVersion": ""
2227+
},
21222228
{
21232229
"Name": "tag",
21242230
"Alias": "",
@@ -2616,6 +2722,15 @@
26162722
"FromVersion": "0.16.0",
26172723
"RemovedInVersion": ""
26182724
},
2725+
{
2726+
"Name": "stuck-request-timeout",
2727+
"Alias": "",
2728+
"Default": "5m0s",
2729+
"Description": "duration after which to retry stuck requests",
2730+
"Once": true,
2731+
"FromVersion": "0.18.0",
2732+
"RemovedInVersion": ""
2733+
},
26192734
{
26202735
"Name": "tls-client-cert",
26212736
"Alias": "",

0 commit comments

Comments
 (0)