gilbertchen / duplicacy

A new generation cloud backup tool
https://duplicacy.com
Other
5.24k stars 338 forks source link

Where Does Restored File Go? #246

Open madranet opened 7 years ago

madranet commented 7 years ago

I've made a backup containing the following file [this is taken from running the duplicacy list -files command]:

<snip>
40683 2014-03-14 13:27:35 eae038c85ab0ce7a102318fc95ba1920e0035a2185b3e38b34fce11aa0c4c965 Documents/pearsanta/BPMonitor DATA.csv
<snip>

To test duplicacy's restore feature, I delete that file from my laptop and then run duplicacy restore -r 1 /Users/madra/Documents/pearsanta/BPMonitor\ DATA.csv

After a few minutes, my terminal spits out the following:

ᐅ  duplicacy restore -r 1 /Users/madra/Documents/pearsanta/BPMonitor\ DATA.csv
Storage set to s3://eu-west-1@amazon.com/xxxxx/xxxxx
Loaded 36 include/exclude pattern(s)
Restoring /Users/madra to revision 1
Restored /Users/madra to revision 1
Total running time: 00:00:34

But the file isn't restored. At least, it's not back in its original directory and searching for it doesn't turn it up. So:

1: Where is the file hiding? 2: If it hasn't been restored, why is Duplicacy saying it has been?

gilbertchen commented 7 years ago

The files to be restored is specified using relative paths, so the command should be:

 duplicacy restore -r 1 Documents/pearsanta/BPMonitor\ DATA.csv
madranet commented 7 years ago

The files to be restored is specified using relative paths

OK. Fair enough. Providing a relative path worked. Mea culpa

ᐅ  duplicacy restore -r 1 Documents/pearsanta/BPMonitor\ DATA.csv
Storage set to s3://eu-west-1@amazon.com/xxxxxxx/xxxxxxx
Loaded 36 include/exclude pattern(s)
Restoring /Users/madra to revision 1
Downloaded Documents/pearsanta/BPMonitor DATA.csv (40683)
Restored /Users/madra to revision 1
Total running time: 00:00:37

However, I still think the error reporting should be made more explicit. Now that I've seen the terminal output from the succesful command, I can see that it lists which file/s have been restored and to where. But having previously only seen the terminal output given in my first post, there was nothing in that to indicate that the restore had failed. Some thoughts:

1: Either report that the restore has failed explicitly [or implicitly by stating something like Downloaded 0 files]

2: When a full path is given [as I accidentally did first time around], I would have expected Duplicacy would recreate that path when restoring the file. ie. I'd expect Duplicacy to put the restored file under: /Users/madra/Users/madra/Documents/pearsanta/BPMonitor\ DATA.csv [much in the same way tar will do when expanding an archive], rather than just silently fail to create it at all and not give any indication that anything had gone wrong.

3: Given that Duplicacy seemingly doesn't [re-]create the full path to a file, what happens if I try to restore a single file from a directory [or subdirectory] that formerly lived under parent directory[ies] which have been deleted? Will Duplicacy re-create the intermediate directories, or silently fail because they aren't there? Do I have to restore the parent directory[ies] too, so that Duplicacy will have somewhere to put the restored file?

Finally, a piece of criticism, which you'll hopefully take as constructive:

I really think you need to spend some time proof-reading the documentation and providing some examples. Since I discovered Duplicacy, I've had to open about half a dozen issues here, despite RTFM, because the documentation was either unclear or didn't provide examples or... in at least one case was downright wrong.

Now, that might be just me being exceptionally stupid. But I don't think so.

When I look at the documentation for a project, I shouldn't have to be guessing:

..etc.

All pretty straightforward questions, the answers to which I either had to work out by trial and error—or take up your valuable time by opening issues on Github about—when a few examples [or corrections] in the documentation would have saved a lot of hassle.

gilbertchen commented 7 years ago

I accept your criticism on the documentation. I've started working on the wiki page to expand the user guide which should become more comprehensive and accurate. The write access to the wiki page is open to every, so you're welcome to make changes any time you spot an error.

As for the restore messages, I agree it should at leave give out a warning when no files are actually restore while at least one file is specified.