diff --git a/README.md b/README.md index 3bc6fa4..8479bba 100644 --- a/README.md +++ b/README.md @@ -483,7 +483,7 @@ It needs: - Permission to read at the destination, and to list it when you give a remote key, or a snapshot ID that is not in the local index. -The file list is stored only in the snapshot's encrypted database. The command +The command reads the file list from the snapshot's encrypted database. It downloads and decrypts that database. It writes the decrypted database to a temporary directory and removes it afterwards. See [Temporary files](#temporary-files). @@ -499,12 +499,12 @@ The table is sorted by path. It has these columns: - `MODIFIED`: the modification time, in UTC. - `PATH`: the original absolute path. -In the table, a path that holds a newline or another non-printable character is -shown in double quotes, with that character escaped, as in `"a\nb"`. +A path can contain a newline or another non-printable character. The table shows +such a path in double quotes, with that character escaped, as in `"a\nb"`. The mode looks like the one `ls -l` shows, as in `-rw-r--r--` or `drwxr-xr-x`. -The letters before the nine permission characters show the type and any special -bit. These letters differ from `ls -l`: +The letters before the nine permission characters show the type. They also show +the setuid, setgid and sticky bits. These letters differ from `ls -l`: - `L`: a symlink, which `ls -l` shows as `l`. - `u`: setuid, which `ls -l` shows as `s` in place of the owner's `x`. @@ -1096,7 +1096,7 @@ The URL takes no parameters and no credentials. ### Interrupted uploads An upload that is cut off must not leave a partial object under the final name. -A later backup would take that object for complete. +A later backup would treat that object as complete. - S3 shows an object only once its upload has finished. - The local directory destination writes a temporary file and then renames it. @@ -1127,9 +1127,9 @@ Commands need these permissions at the destination: - `prune` and `snapshot create --prune` list, read and delete. On an rclone remote, a backup can also need permission to read and delete. Which -ones depends on the storage service. An upload to a remote that can move objects -looks up the object it replaces and deletes it. It stops when the look-up is -refused. +ones depends on the storage service. On a remote that can move objects, an +upload looks up the object it replaces and deletes that object. The upload stops +when the look-up is refused. These commands list only when you give a remote key, or a snapshot ID that is not in the local index: diff --git a/configs/config.example.yml b/configs/config.example.yml index 67117a2..8915d25 100644 --- a/configs/config.example.yml +++ b/configs/config.example.yml @@ -29,7 +29,7 @@ age_recipients: # Named snapshots - each snapshot can contain multiple paths # Each snapshot gets its own ID and can have snapshot-specific excludes # Required: at least one snapshot, and every snapshot needs at least one path. -# Only the config commands, version and completion run without a snapshot +# Otherwise only the config commands, version and completion run snapshots: testing: paths: diff --git a/docs/REPOSTRUCTURE.md b/docs/REPOSTRUCTURE.md index b9bf04a..30d9bbe 100644 --- a/docs/REPOSTRUCTURE.md +++ b/docs/REPOSTRUCTURE.md @@ -312,7 +312,8 @@ These commands write unencrypted data to the temporary directory: is no limit on their total size. - `snapshot restore` writes the decrypted database to `vaultik-restore-*/snapshot.db`. -- `snapshot files` writes the decrypted database to the same place. +- `snapshot files` writes the decrypted database to + `vaultik-restore-*/snapshot.db` as well. - `snapshot verify --deep` writes the decrypted database to `vaultik-verify-*/snapshot.db`. - `snapshot create` writes a copy of the local index to @@ -342,9 +343,9 @@ it needs no other permission. Other commands need more: - `prune` lists, reads and deletes. On an rclone remote, a backup can also need permission to read and delete. Which -ones depends on the storage service. An upload to a remote that can move objects -looks up the object it replaces and deletes it. It stops when the look-up is -refused. +ones depends on the storage service. On a remote that can move objects, an +upload looks up the object it replaces and deletes that object. The upload stops +when the look-up is refused. These commands list only when they are given a remote key, or a snapshot ID that is not in the local index: diff --git a/internal/cli/root.go b/internal/cli/root.go index bcf7a2f..0dac8e6 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -37,8 +37,12 @@ func NewRootCommand() *cobra.Command { Short: "Secure incremental backup tool with asymmetric encryption", Long: `vaultik is an incremental backup tool that encrypts data to age public keys and uploads it to an S3-compatible object store, a local directory or -an rclone remote. The backed-up machine needs no private key: only -'snapshot files', 'snapshot restore' and 'snapshot verify --deep' need one.`, +an rclone remote. The backed-up machine needs no private key. Only these +commands need one: + + snapshot files + snapshot restore + snapshot verify --deep`, SilenceUsage: true, // Bare 'vaultik' (no subcommand): print help. The banner is // printed once at process startup by Entry, before cobra diff --git a/internal/cli/snapshot.go b/internal/cli/snapshot.go index 68b054f..744a01d 100644 --- a/internal/cli/snapshot.go +++ b/internal/cli/snapshot.go @@ -208,10 +208,10 @@ The snapshot may be named by its ID or, on a host with no local index, by the remote key that 'snapshot list' prints for a remote-only snapshot (an unambiguous leading part is enough). -The file list is only in the snapshot's encrypted database, so this -downloads and decrypts it. It requires the age private key, in the -VAULTIK_AGE_SECRET_KEY environment variable or as age_secret_key in the -config file; the environment variable wins. +The command reads the file list from the snapshot's encrypted database. +It downloads and decrypts that database. It requires the age private +key, in the VAULTIK_AGE_SECRET_KEY environment variable or as +age_secret_key in the config file; the environment variable wins. Also needs permission to read the backup destination store, and to list it when given a remote key, or a snapshot ID that is not in the local