Ok, I have finally gotten around to upgrading one of our production servers to 7.2 (it was real old before). and now I can no longer backup the machine using curl.
I used to do
curl -f -s -k -n -F function=backup -F state=perform
https://mysme/server-manager/cgi-bin/backup > mybackupfile.tgz
(-n tells curl to use .netrc for passwords)
Now the new release requires a login via a web form this no longer works. What I get is a redirect to the login page...
No problem I think I can just pull the same trick for the login page first with
curl -f -s -k --cookie-jar /tmp/mycookies -F username=myusername -F password=mypassword
https://mysme/server-common/cgi-bin/logincurl -f -s -k --cookie /tmp/mycookies -F function=backup -F state=perform
https://mysme/server-manager/cgi-bin/backup > mybackupfile.tgz
The problem is the login curl does not do as I expect but gives be a 307 redirect to the login page again with no cookies updated.
Does anyone have any idea what I am missing here.
Thanks,
Dave.