Re: Problems with remote repository access via sftp
Denis Corbin <[email protected]> Thu, 29 Sep 2022 23:36:55 +0200
| Newsgroups | gmane.comp.sysutils.backup.dar.support |
|---|---|
| Message-ID | <[email protected]> |
On 29/09/2022 14:38, Martin Michel wrote: > Hi Denis, Hi Martin, > > thanks for looking into this! Well, there is something unclear about absolute path and relative path in URL with dar: what seems true however is that you can force dar to read a path as absolute by having two slashes at the beginning of the path part: sftp://user@host//mnt/some/where if I use instead sftp://user@host/mnt/some/where I get an error about the "mnt/some/where" path not existing (no leading /), maybe this is a display bug, I will have a look at that on Saturday. But using dar and dar_static 2.7.7, I could read a dar backup (even a ciphered one) through sftp without any issue (using the leading two slashes and full path to the backup). note that ftp seems broken in dar 2.7.7 when used with pure-ftpd (at least), there is a open bug report on that I just struggle to find time to work on. But my free time should be back in a few months from now and I hope to continue working on the planned and interesting features for dar/libdar. Anyway I will try to have to for that too on Saturday. > >>> Here is what I tried (the name of archive is 'first', path to file on server is '~/archives/server4you/first.1.dar'): >>> $ dar_static -va -t sftp://[email protected]/archives/server4you/first >>> Parse error: Error opening directory: archives/server4you : No such file or directory >> >> you should use the full path to the backup: there is no way in an URL to >> specify a relative path (relative to the user's home directory for example) >> so something like this should work: >> >> dar -va -t sftp://xxxx@host/home/xxx/archive/server4you/first > > Hm, this does not work for me. OK, I would amend my previous writing with this: dar -va -t sftp://xxxx@host//home/xxx/archive/server4you/first can you try this? > The thing is that the path above worked fine for creation of the archive, so this command succeeded (at least for establishing a connection): > > dar -c sftp://[email protected]/archives/server4you/first [...] > > But maybe there is also a speciality of how my cloud storage (Hetzner StorageBox) is configured by the vendor? Before going to this hypothesis, I would first like to validate the behavior of dar. To eliminate possible impact of different version of libcurl, I would advise for now to test with the dar_static I provide at https://dar.edrusb.org/dar.linux.free.fr/Releases/ if you don't mind. Depending on the result, we will try with your dar binary, or another sftp repo to validate or invalidate hypothesis (bug in dar, build problem with libcurl, restricted sftp protocol at your cloud provider, and so on). > I do not have a fully fledged Linux server but restricted to some protocols (but where sftp is one of it) > > However, running strace does not give any indication that `dar` tries to establish a TCP connection at all. this is pretty possible if the URL splitting algorithm does not recognizes properly the hostname and what is seen as a hostname does not exist. Can you check in the 'Remote repository syntax' paragraph of the man page ( http://dar.linux.free.fr/doc/man/dar.html ) that you do not fall in one of the syntax exception cases? > Shall I attach the output to my mail (not sure it works with this mailing list)? not sure it would help, but you can still send it to me directly. > > Kind regards, > Cheers, Denis > >
OpenPGP_signature
(application/pgp-signature, 840 B) - not displayed