I'm only trying to help and I feel you're not accepting it. I'm sorry I cannot communicate this any better.
if ! wget -t1 --timeout=10 -qO- --keep-session-cookies --save-cookies /tmp/${IDENTIFIER}_cookies.txt ${WGETOPT} ${PROTO}://${IP}:${PORT}/diag_backup.php | grep "name='__csrf_magic'" | sed 's/.*value="\(.*\)".*/\1/' > /tmp/${IP}-csrf.txt ; then echo "Error fetching cookie" >&2 exit 1 else [ ${HEADLESS} ] || echo "Got session cookie" >&2 fi if ! wget -t1 --timeout=10 -qO- --keep-session-cookies --load-cookies /tmp/${IDENTIFIER}_cookies.txt --save-cookies /tmp/${IDENTIFIER}_cookies.txt --post-data "login=Login&usernamefld=${USER}&passwordfld=${PASS}&__csrf_magic=`cat /tmp/${IP}-csrf.txt`" ${WGETOPT} ${PROTO}://${IP}:${PORT}/diag_backup.php | grep "name='__csrf_magic'" | sed 's/.*value="\(.*\)".*/\1/' > /tmp/${IP}-csrf2.txt ; then echo "Error pushing the session cookie" >&2 exit 1 else [ ${HEADLESS} ] || echo "Pushed cookie" >&2 fi if ! wget -t1 --timeout=30 -qO ${FNAME} --keep-session-cookies --load-cookies /tmp/${IDENTIFIER}_cookies.txt --post-data "download=download&donotbackuprrd=yes&__csrf_magic=$(head -n 1 /tmp/${IP}-csrf2.txt)" ${WGETOPT} ${PROTO}://${IP}:${PORT}/diag_backup.php ; then echo "Error fetching ${FNAME}" >&2 rm -f "${FNAME}" exit 1 else [ ${HEADLESS} ] || echo "Fetched ${FNAME}" >&2 fi
rsync -av --update --partial --append --log-file=$HOME/.rsyncd.log <source> <destination>
How about a cron job along the lineCode: [Select]rsync -av --update --partial --append --log-file=$HOME/.rsyncd.log <source> <destination>?https://www.freebsd.org/cgi/man.cgi?query=rsync
wget --http-user=mdcO...DsfO --http-passwd=1l0kZaw..d3C -O tmp_config.xml --no-check-certificate --auth-no-challenge https://firewall.test/api/backup/backup/download
Thanks...That URL works.... ...in Chrome when I have previously logged in.It doesn't when I logout.With wget it gives me "Username/Password Authentication Failed."So I can't directly use that URL without logging in first.It seems I'm not providing the credentials.
--http-user=mdcO...DsfO --http-passwd=1l0kZaw..d3C
I am using --no-check-certificateYou use it in your example, but write I shouldn't use it.I take it as an advice to install a certificate. For now I need to to use it as it's not installed yet....