Hello,
I am at Pair networks on a FreeBSD server. I need to backup my previously tar.gz databases on a WebDav cloud storage as Yandex Disk or Box.com or 4Shared.
Everything works fine with Putty, command line after command line. I am be able to upload my file on Yandex Disk:
However, my bash script fails to upload my file.
Here is my bash script "criptdav.sh":
Here is my "datadav" file:
Here is Putty screenshot of my bash script:
Nota Bene:
I tried with Yandex, Box, 4Shared. Same results: Works command line after command line, but script fails to upload my file.
QUESTION:
What's wrong with my bash script?
Thank you for help!
I am at Pair networks on a FreeBSD server. I need to backup my previously tar.gz databases on a WebDav cloud storage as Yandex Disk or Box.com or 4Shared.
Everything works fine with Putty, command line after command line. I am be able to upload my file on Yandex Disk:
Code:
%cadaver
dav:!> open https://webdav.yandex.com
Authentication required for Yandex.Disk on server `webdav.yandex.com':
Username: MyUserName
Password:
dav:/> put MyFile.sql.gz
Uploading MyFile.sql.gz to `/MyFile.sql.gz':
Progress: [=============================>] 100.0% of 1229518 bytes succeeded.
dav:/> exit
Connection to `webdav.yandex.com' closed.
%
However, my bash script fails to upload my file.
Here is my bash script "criptdav.sh":
Code:
#!/bin/sh
/usr/local/bin/cadaver < datadav
Code:
open https://webdav.yandex.com
MyUserName
MyPassword
put MyFile.sql.gz
exit
Code:
%sh scriptdav.sh
dav:!> open https://webdav.yandex.com
Authentication required for Yandex.Disk on server `webdav.yandex.com':
Username: MyUserName
dav:/>
Connection to `webdav.yandex.com' closed.
%
Nota Bene:
I tried with Yandex, Box, 4Shared. Same results: Works command line after command line, but script fails to upload my file.
QUESTION:
What's wrong with my bash script?
Thank you for help!