Relative path problem

Alexander Gribanov sunrisecoder at gmail.com
Wed Jul 27 08:17:06 UTC 2022


Hello!

I have external HDD for backups, but under Windows it may get different
drive letter on different computers, so I would like to use relative path
instead of full path like ../Backup instead of /cygdrive/g/Backup

In this case I have in the root folder of the drive 2 folders:
cygwin-rsync - here rsync and bat-scripts for backup all needed modules
Backup - here where all backup files should be stored

So when I connect the drive, I go to the folder cygwin-rsync and run there
backup.bat...
it contains a command like this:
bin\rsync.exe -vvrlth --progress --delete-before --password-file
password.txt user at myhost.com::Module1 ../Backup/Module1
This should works (destination folder is one folder up and then Backup
folder, etc), but instead it says that:
rsync: mkdir "/../Backup/Module1" failed: No such file or directory (2)
I don't understand why it adds a slash "/" at the beginning of the
destination path?
Is it a bug or I'm doing something wrong? Thank You very much.

Here is the full log:
g:\cygwin-rsync>bin\rsync.exe -vvrlth --progress --delete-before
--password-file password.txt user at myhost.com::Module1 ../Backup/Module1
opening tcp connection to myhost.com port 873
sending daemon args: --server --sender -vvltre.LsfxC . Module1/  (5 args)
receiving file list ...
3310 files to consider
rsync: mkdir "/../Backup/Module1" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at main.c(675) [Receiver=3.1.2]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20220727/bc41f615/attachment.htm>


More information about the rsync mailing list