Add snapshot files to list a snapshot's files without restoring it (closes #435)
check / check (push) Successful in 12m11s
check / check (push) Successful in 12m11s
`vaultik snapshot files <snapshot-id> [path] [--json]` downloads and decrypts the snapshot database, as restore does, and prints mode, size, modification time and path for every file at or under the path. A path that matches nothing is an error. It needs the private key. The mode is in Go's file-mode notation, which the README spells out. Named `files` because `ls` is already the alias of `snapshot list`. The missing-key error no longer says "for restore", since this command and deep verify return it too. The README opening now states the private-key rule first. Model: opus-5-5
This commit is contained in:
1 parent
5ca0d46932
commit
600f3a9592
8 files changed
+457
-41
No files matched your search
+6
-5
@@ -38,10 +38,11 @@ const (
|
||||
// prune, remote nuke) write the local index or the remote store. They
|
||||
// hold the PID lock so that at most one runs at a time.
|
||||
mutating lockMode = iota
|
||||
// readOnly commands (info, snapshot list, snapshot verify, remote info,
|
||||
// snapshot restore) do not write the local index or the remote store,
|
||||
// so they run without the lock and are never blocked by a running
|
||||
// mutator. restore writes only to the target directory it is given.
|
||||
// readOnly commands (info, snapshot list, snapshot files, snapshot
|
||||
// verify, remote info, snapshot restore) do not write the local index
|
||||
// or the remote store, so they run without the lock and are never
|
||||
// blocked by a running mutator. restore writes only to the target
|
||||
// directory it is given.
|
||||
readOnly
|
||||
)
|
||||
|
||||
@@ -310,7 +311,7 @@ func RunOperation(
|
||||
}
|
||||
|
||||
// runVaultikApp runs the standard single-operation command lifecycle
|
||||
// shared by the snapshot list/purge/remove and remote nuke subcommands:
|
||||
// shared by the snapshot list/files/purge/remove and remote nuke subcommands:
|
||||
// resolve the config, then run op against the Vaultik instance through
|
||||
// RunOperation, reporting a failure prefixed with failMsg on stderr. mode
|
||||
// says whether the command takes the PID lock. jsonOutput marks a command
|
||||
|
||||
Reference in new issue
Block a user