Calling history for a file not in repository root doesn’t show the backup hash of that file:

history

#1

Ah, now i understand what you’re saying and I think this is a bug.


I can confirm what you’re saying:

Calling history for a file not in repository root doesn’t show the backup hash of that file:

C:\duplicacy repositories\asus>z history -hash "Z__patrunjel_link\Patrunjel\Media\Concerte\Anathema - Universal (2013)\Anathema - Universal.mkv"
Storage set to G:/My Drive/backups/duplicacy
      1:
      6:
      8:
     10:
     12:
     13:
     15:
     16:
     17:
     18:
     20:
     21:
     23:
     24:
     26:
     27:
     28:
current:      2330033047 2017-01-16 18:43:58 ad9277ce27f9186475d9cbc03f8bc6b9392def1d7537f69e066040aa8c57c905 Z__patrunjel_link\Patrunjel\Media\Concerte\Anathema - Universal (2013)\Anathema - Universal.mkv*

While calling history for a file in repository root does show the backup hash of that file:

C:\duplicacy repositories\asus>z history z.exe
Storage set to G:/My Drive/backups/duplicacy
      1:        25497600 2018-03-18 08:48:07 c49a9095edbcc0b484835250879110417b8e56beb1fbd2b5cd2c0cd4ce995406 z.exe
      6:        25252352 2018-04-02 20:34:33 548d119f28b865d06faf285f91da35234c6037640f7d7dbdd2bd87f6e533f6ee z.exe*
      8:        25252352 2018-04-02 20:34:33 548d119f28b865d06faf285f91da35234c6037640f7d7dbdd2bd87f6e533f6ee z.exe
     10:        25252352 2018-04-02 20:34:33 548d119f28b865d06faf285f91da35234c6037640f7d7dbdd2bd87f6e533f6ee z.exe
     12:        25252352 2018-04-02 20:34:33 548d119f28b865d06faf285f91da35234c6037640f7d7dbdd2bd87f6e533f6ee z.exe
     13:        24605696 2018-06-10 07:52:13 ab5f12c224fa591aae058857e1a43db20f7968c840bb71923b52a9b9f567fc95 z.exe*
     15:        24605696 2018-06-10 07:52:13 ab5f12c224fa591aae058857e1a43db20f7968c840bb71923b52a9b9f567fc95 z.exe
     16:        25986560 2018-07-25 18:37:25 5be831de658cd508b6ec150f06a61fa30f25c3e6dc8c5e928e07a62feaabda7a z.exe*
     17:        25986560 2018-07-25 18:37:25 5be831de658cd508b6ec150f06a61fa30f25c3e6dc8c5e928e07a62feaabda7a z.exe
     18:        25986560 2018-07-25 18:37:25 5be831de658cd508b6ec150f06a61fa30f25c3e6dc8c5e928e07a62feaabda7a z.exe
     20:        25986560 2018-07-25 18:37:25 5be831de658cd508b6ec150f06a61fa30f25c3e6dc8c5e928e07a62feaabda7a z.exe
     21:        25986560 2018-07-25 18:37:25 5be831de658cd508b6ec150f06a61fa30f25c3e6dc8c5e928e07a62feaabda7a z.exe
     23:        25986560 2018-07-25 18:37:25 5be831de658cd508b6ec150f06a61fa30f25c3e6dc8c5e928e07a62feaabda7a z.exe
     24:        25986560 2018-07-25 18:37:25 5be831de658cd508b6ec150f06a61fa30f25c3e6dc8c5e928e07a62feaabda7a z.exe
     26:        25986560 2018-07-25 18:37:25 5be831de658cd508b6ec150f06a61fa30f25c3e6dc8c5e928e07a62feaabda7a z.exe
     27:        25986560 2018-07-25 18:37:25 5be831de658cd508b6ec150f06a61fa30f25c3e6dc8c5e928e07a62feaabda7a z.exe
     28:        25986560 2018-07-25 18:37:25 5be831de658cd508b6ec150f06a61fa30f25c3e6dc8c5e928e07a62feaabda7a z.exe
current:        25986560 2018-07-25 18:37:25                                                                  z.exe

C:\duplicacy repositories\asus>

See original discussion below:


History command details
#2

I am struggling to get a history of a file in a sub directory of a repository. I have get history for files in the root of the repository, but not in sub directories. I have tried :-

duplicacy history filename.txt
duplicacy history subdirectory\filename.txt
duplicacy history \subdirectory\filename.txt

But at each stage it only lists in current:

Can you give me a syntax example I should be using?


History command details
#3

I think you missed pasting a part of the output.


Here is an example of how i used history:

C:\duplicacy repositories\asus>z history  "Z__patrunjel_link\Patrunjel\Media\Concerte\Anathema - Universal (2013)\Anathema - Universal.mkv"
Storage set to G:/My Drive/backups/duplicacy
      1:
      6:
      8:
     10:
     12:
     13:
     15:
     16:
     17:
     18:
     20:
     21:
     23:
     24:
     26:
     27:
     28:
current:      2330033047 2017-01-16 18:43:58                                                                  Z__patrunjel_link\Patrunjel\Media\Concerte\Anathema - Universal (2013)\Anathema - Universal.mkv

C:\duplicacy repositories\asus>z history -r 21 "Z__patrunjel_link\Patrunjel\Media\Concerte\Anathema - Universal (2013)\Anathema - Universal.mkv"
Storage set to G:/My Drive/backups/duplicacy
     21:
current:      2330033047 2017-01-16 18:43:58                                                                  Z__patrunjel_link\Patrunjel\Media\Concerte\Anathema - Universal (2013)\Anathema - Universal.mkv

C:\duplicacy repositories\asus>

And these are the contents of my repository:

Notice how i had to put the file path (relative to the repository) in " because it contains spaces in the path!


#4

I might be missing something, but it does not look like you usage is working either, because it does not seem to be showing the hashes for the file in each of the backups.

For example when I look for a file in the root of the repository, I get the this :-

C:\Users\swainstm\Documents>duplicacy history junktestfile.bin
Storage set to sftp://duplicacy@192.168.10.31//share/CACHEDEV1_DATA/duplicacy/main
      1:
      2:
      3:
      4:
      5:
      6:
      7:
      8:
      9:
     10:
     11:
     12:
     13:        15617187 2018-10-27 17:02:40 dc0092487a7005163fad865cb07957455f4bdd8f090929380501243448fe3840 junktestfile.bin
     14:        15617187 2018-10-27 17:02:40 dc0092487a7005163fad865cb07957455f4bdd8f090929380501243448fe3840 junktestfile.bin
     15:        15617187 2018-10-27 17:02:40 dc0092487a7005163fad865cb07957455f4bdd8f090929380501243448fe3840 junktestfile.bin
     16:        15617187 2018-10-27 17:02:40 dc0092487a7005163fad865cb07957455f4bdd8f090929380501243448fe3840 junktestfile.bin
     17:        15617187 2018-10-27 17:09:14 0ba6c2fc386eb5340b340b8f1d686128e433bc128ac311fbc3d22dab0adada59 junktestfile.bin*
current:        15617187 2018-10-27 17:09:14                                                                  junktestfile.bin

C:\Users\swainstm\Documents>

Which I think look correct, because I only added this file in the 13th backup, and I can see that it changed in the 17th backup.

But if I try a similar thing for a file in a subdirectory, I am not getting the hash file it is stored in each version. eg :-

C:\Users\swainstm\Documents>duplicacy history "personal\fridge.xlsx"
Storage set to sftp://duplicacy@192.168.10.31//share/CACHEDEV1_DATA/duplicacy/main
      1:
      2:
      3:
      4:
      5:
      6:
      7:
      8:
      9:
     10:
     11:
     12:
     13:
     14:
     15:
     16:
     17:
current:            6995 2016-09-15 15:52:41                                                                  personal\fridge.xlsx

#5

when you are pasting output or code or logs, please put those inbetween triple backticks “```” (one line above your code, and one line after) (backtick on the US keyboard is the key just below esc)

Example:

```
some text

some other text
more text
```

#6

Thanks for the tutorial :slight_smile:

I have fixed it.


#7

In that case you should use the -hash option for history

C:\duplicacy repositories\asus>z history -hash "Z__patrunjel_link\Patrunjel\Media\Concerte\Anathema - Universal (2013)\Anathema - Universal.mkv"
Storage set to G:/My Drive/backups/duplicacy
      1:
      6:
      8:
     10:
     12:
     13:
     15:
     16:
     17:
     18:
     20:
     21:
     23:
     24:
     26:
     27:
     28:
current:      2330033047 2017-01-16 18:43:58 ad9277ce27f9186475d9cbc03f8bc6b9392def1d7537f69e066040aa8c57c905 Z__patrunjel_link\Patrunjel\Media\Concerte\Anathema - Universal (2013)\Anathema - Universal.mkv*

C:\duplicacy repositories\asus>

#8

I think you are missing the point of the command (or I am). Putting the -hash give the hash of the file as it currently is on disk. But I want to see the hash for the file at prior times when the backup happened. With this I should be able to see when the file has changed (ie new hash file in the new backup). I assume that is what the history command is for.

It seems to work perfectly for files in the root of the repository (see my example with junktestfile.bin above). Look at version 13-17 in my example for that file showing the hashs in each of those backups (notice the hash changes in the 17th backup, and this is as expected as a changed the file. But not when they are in the sub directory. See my example above (and yours) with no hashes for each of the backups despite that file being in all those backups.


#9

I think this is an issue of / vs \. Duplicacy always uses / even on Windows, so can you try replacing \ with / in the path?


#10

The thing is: we use \ because windows does autocomplete for us :D.


#11

The / seems to work. Thanks for that.


#12

For anyone: Feel free to use the :heart: button on the posts that you found useful.

For the OP of any support topic: you can mark the post that solved your issue by ticking the image box under the post. That of course may include your own post :slight_smile:


#13

Is there any reason why duplicacy should not interpret \ as / (at least on Windows)?