mirror of
https://github.com/restic/restic.git
synced 2025-10-09 13:49:58 +00:00
cmd/copy: Prefix hostname to snapshot display output
This change better resembles the output generated by `Snapshot.String()`, which includes both username and hostname. Closes #4506 Before: ``` $ restic copy --from-repo /srv/restic-repo repository 3666882b opened (version 2, compression level auto) repository 0085c387 opened (version 2, compression level auto) created new cache in /home/mike/.cache/restic [0:00] 100.00% 1 / 1 index files loaded [0:00] 0 index files loaded snapshot 32b39a20 of [/home/mike/data] at 2023-10-21 16:01:13.979948154 -0300 -03) copy started, this may take a while... [0:00] 100.00% 1 / 1 packs copied snapshot 10331fdd saved ``` After: ``` $ restic copy --from-repo /srv/restic-repo repository 3666882b opened (version 2, compression level auto) repository 0085c387 opened (version 2, compression level auto) [0:00] 100.00% 1 / 1 index files loaded [0:00] 0 index files loaded snapshot 32b39a20 of [/home/mike/data] at 2023-10-21 16:01:13.979948154 -0300 -03 by mike@desktop) copy started, this may take a while... [0:00] 100.00% 1 / 1 packs copied snapshot a67bd1ee saved ```
This commit is contained in:

committed by
Michael Eischer

parent
634e2a46d9
commit
045aa64558
@@ -94,11 +94,11 @@ example from a local to a remote repository, you can use the ``copy`` command:
|
||||
repository d6504c63 opened successfully, password is correct
|
||||
repository 3dd0878c opened successfully, password is correct
|
||||
|
||||
snapshot 410b18a2 of [/home/user/work] at 2020-06-09 23:15:57.305305 +0200 CEST)
|
||||
snapshot 410b18a2 of [/home/user/work] at 2020-06-09 23:15:57.305305 +0200 CEST by user@kasimir)
|
||||
copy started, this may take a while...
|
||||
snapshot 7a746a07 saved
|
||||
|
||||
snapshot 4e5d5487 of [/home/user/work] at 2020-05-01 22:44:07.012113 +0200 CEST)
|
||||
snapshot 4e5d5487 of [/home/user/work] at 2020-05-01 22:44:07.012113 +0200 CEST by user@kasimir)
|
||||
skipping snapshot 4e5d5487, was already copied to snapshot 50eb62b7
|
||||
|
||||
The example command copies all snapshots from the source repository
|
||||
@@ -193,18 +193,18 @@ the unwanted files from affected snapshots by rewriting them using the
|
||||
$ restic -r /srv/restic-repo rewrite --exclude secret-file
|
||||
repository c881945a opened (repository version 2) successfully, password is correct
|
||||
|
||||
snapshot 6160ddb2 of [/home/user/work] at 2022-06-12 16:01:28.406630608 +0200 CEST)
|
||||
snapshot 6160ddb2 of [/home/user/work] at 2022-06-12 16:01:28.406630608 +0200 CEST by user@kasimir)
|
||||
excluding /home/user/work/secret-file
|
||||
saved new snapshot b6aee1ff
|
||||
|
||||
snapshot 4fbaf325 of [/home/user/work] at 2022-05-01 11:22:26.500093107 +0200 CEST)
|
||||
snapshot 4fbaf325 of [/home/user/work] at 2022-05-01 11:22:26.500093107 +0200 CEST by user@kasimir)
|
||||
|
||||
modified 1 snapshots
|
||||
|
||||
$ restic -r /srv/restic-repo rewrite --exclude secret-file 6160ddb2
|
||||
repository c881945a opened (repository version 2) successfully, password is correct
|
||||
|
||||
snapshot 6160ddb2 of [/home/user/work] at 2022-06-12 16:01:28.406630608 +0200 CEST)
|
||||
snapshot 6160ddb2 of [/home/user/work] at 2022-06-12 16:01:28.406630608 +0200 CEST by user@kasimir)
|
||||
excluding /home/user/work/secret-file
|
||||
new snapshot saved as b6aee1ff
|
||||
|
||||
|
Reference in New Issue
Block a user