Line 18: |
Line 18: |
| | | |
| These two actions map to the following cURL commands: | | These two actions map to the following cURL commands: |
− |
| |
| | | |
| curl -s -k -b ~/.sme_cookies -c ~/.sme_cookies -F "username=admin" -F "password=your_password" \ | | curl -s -k -b ~/.sme_cookies -c ~/.sme_cookies -F "username=admin" -F "password=your_password" \ |
Line 24: |
Line 23: |
| | | |
| curl -f -s -k -b ~/.sme_cookies -F function=desktop-backup -F state=perform \ | | curl -f -s -k -b ~/.sme_cookies -F function=desktop-backup -F state=perform \ |
− | <nowiki>https://your_sme_server/server-manager/cgi-bin/backup > backupfile.tar.gz</nowiki> | + | <nowiki>https://your_sme_server/server-manager/cgi-bin/backup > backupfile.tar.gz</nowiki> |
− |
| + | Where: |
− | Where:
| + | * Each curl commands should be on one line and the \ removed |
− | Each curl commands should be on one line and the \ removed
| + | * your_password is replaced by your password |
− | your_password is replaced by your password
| + | * your_sme_server is replaced with the name or IP number of the SME Server you wish to backup |
− | your_sme_server is replaced with the name or IP number of the SME Server you wish to backup
| + | * backupfile.tar.gz is the name you want to save the backup as |
− | backupfile.tar.gz is the name you want to save the backup as
| |
| | | |
| {{Warning box|If you are sharing the machine doing the backup with others using <nowiki> -F "password=your_password"</nowiki> is not secure. Any user can see your password with ps if they can catch it while the command is running! | | {{Warning box|If you are sharing the machine doing the backup with others using <nowiki> -F "password=your_password"</nowiki> is not secure. Any user can see your password with ps if they can catch it while the command is running! |
Line 38: |
Line 36: |
| Then you can replace <nowiki>"password=your_password" in the above with "password=<~/sme_password"</nowiki> | | Then you can replace <nowiki>"password=your_password" in the above with "password=<~/sme_password"</nowiki> |
| }} | | }} |
− |
| |
| {{Note box|Full information on cURL can be found in the [http://curl.haxx.se/docs/manpage.html cURL manual] | | {{Note box|Full information on cURL can be found in the [http://curl.haxx.se/docs/manpage.html cURL manual] |
| | | |
− | | + | The options I used are: |
− | The Options I used are:
| + | * -f Fail silently |
− | -f Fail silently
| + | * -s Silent, I.E. don't show a progress meter |
− | -s Silent, I.E. don't show a progress meter
| + | * -k Don't insist on SSL certs signed by trusted CA's (most SME Servers use self signed certificates) |
− | -k Don't insist on SSL certs signed by trusted CA's (most SME Servers use self signed certificates)
| + | * -b <cookies> Send cookies to server |
− | -b <cookies> Send cookies to server
| + | * -c <cookies> Save cookies here, this is where it stashes your login credentials between step 1) and 2) |
− | -c <cookies> Save cookies here, this is where it stashes your login credentials between step 1) and 2)
| + | * -F Fill in form field |
− | -F Fill in form field
| + | * <url> |
− | <url>
| |
| | | |
| '''While this process works and illustrates the principle it does raise some security concerns and can be improved. (see below)''' | | '''While this process works and illustrates the principle it does raise some security concerns and can be improved. (see below)''' |