{"id":805,"date":"2017-11-07T11:26:06","date_gmt":"2017-11-07T20:26:06","guid":{"rendered":"\/blog\/?p=805"},"modified":"2023-09-21T09:37:42","modified_gmt":"2023-09-21T00:37:42","slug":"curl%ec%9d%84-%ec%9d%b4%ec%9a%a9%ed%95%9c-phpmyadmin-%ec%9b%90%ea%b2%a9-%eb%b0%b1%ec%97%85-%ec%8a%a4%ed%81%ac%eb%a6%bd%ed%8a%b8","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=805","title":{"rendered":"curl\uc744 \uc774\uc6a9\ud55c phpMyAdmin \uc6d0\uaca9 \ubc31\uc5c5 \uc2a4\ud06c\ub9bd\ud2b8"},"content":{"rendered":"\n<pre style=\"margin-top: 0px; margin-bottom: 0px; padding: 4px; font-stretch: normal; font-size: 0.9333em; line-height: 1.5em; font-family: Consolas, &quot;Lucida Console&quot;, &quot;DejaVu Sans Mono&quot;, Monaco, &quot;Courier New&quot;, monospace; background: rgb(0, 0, 0); color: rgb(248, 248, 248);\"><span style=\"color: rgb(174, 174, 174); font-style: italic;\">#! \/bin\/bash<\/span>\n\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#set -x<\/span>\n\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># This program is free software published under the terms of the GNU GPL.<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># Forked: http:\/\/picoforge.int-evry.fr\/websvn\/filedetails.php?repname=curlmyback&amp;path=%2Ftrunk%2Fcurl-backup-phpmyadmin.sh&amp;rev=0&amp;sc=1<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># (C) Institut TELECOM + Olivier Berger &lt;olivier.berger@it-sudparis.eu&gt; 2007-2009<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># $Id: curl-backup-phpmyadmin.sh 12 2011-12-12 16:02:44Z berger_o $<\/span>\n\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># Clean up and add parameter handling by Artem Grebenkin<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># &lt;speechkey@gmail.com&gt; http:\/\/www.irepository.net<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># This saves dumps of your Database using CURL and connecting to<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># phpMyAdmin (via HTTPS), keeping the 10 latest backups by default<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># Tested on phpMyAdmin 3.4.5<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># For those interested in debugging\/adapting this script, the firefox<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># add-on LiveHttpHeaders is a very interesting extension to debug HTTP<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># transactions and guess what's needed to develop such a CURL-based<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># script.<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># Arguments: mysql-export.sh [-h|--help] [--stdout] [--tables=&lt;table_name&gt;,&lt;table_name&gt;] [--add-drop] [--apache-user=&lt;apache_http_user&gt;] [--apache-password=&lt;apache_http_password&gt;] [--phpmyadmin-user=&lt;phpmyadmin_user&gt;] [--phpmyadmin-password=&lt;phpmyadmin_password&gt;] [--database=&lt;database&gt;] [--host=&lt;phpmyadmin_host&gt;] [--use-keychain]<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># -h, --help: Print help<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#   --stdout: Write SQL (gzipped) in stdout<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># --tables: Export only particular tables<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># --add-drop: add DROP TABLE IF EXISTS to every exporting table<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># --apache-user=&lt;apache_http_user&gt;: Apache HTTP autorization user<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># --apache-password=&lt;apache_http_password&gt;: Apache HTTP autorization password or keychain entry name if --use-keychain<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># --phpmyadmin-user=&lt;phpmyadmin_user&gt;: PhpMyAdmin user<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># --phpmyadmin-password=&lt;phpmyadmin_password&gt;: PhpMyAdmin password or keychain entry name if --use-keychain<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># --database=&lt;database&gt;: Database to be exported<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># --host=&lt;phpmyadmin_host&gt;: PhpMyAdmin host<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># --use-keychain: Use Mac OS X keychain to get passwords from. In that case --apache-password and --phpmyadmin-password will be used as account name for search in Mac Os X keychain.<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># Common uses: mysql-export.sh --tables=hotel_content_provider --add-drop --database=hs --stdout --use-keychain --apache-user=betatester --phpmyadmin-user=hs --apache-password=www.example.com\\ \\(me\\) --phpmyadmin-password=phpmyadmin.example.com --host=https:\/\/www.example.com\/phpmyadmin | gunzip | mysql -u root -p testtable<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#        exports and imports on the fly in local db<\/span>\n\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># Please adapt these values :<\/span>\n\nAPACHE_USER=0\nAPACHE_PASSWD=0\n\nPHPMYADMIN_USER=0\nPHPMYADMIN_PASSWD=0\n\nREMOTE_HOST=0\nDATABASE=0\nCOMPRESSION=on\nADD_DROP=1\nTMP_FOLDER=<span style=\"color: rgb(101, 176, 66);\">\"\/tmp\"<\/span>\nUSE_KEYCHAIN=0\n\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># End of customisations<\/span>\n\nstdin=0\nexport_tables=0\nadd_drop=0\n\n<span style=\"color: rgb(226, 137, 100);\">for<\/span> <span style=\"color: rgb(62, 135, 227);\">arg<\/span> <span style=\"color: rgb(226, 137, 100);\">in<\/span> <span style=\"color: rgb(62, 135, 227);\">$@<\/span>\n<span style=\"color: rgb(226, 137, 100);\">do<\/span>\n  <span style=\"color: rgb(226, 137, 100);\">if<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> == <span style=\"color: rgb(101, 176, 66);\">'-h'<\/span> ] <span style=\"color: rgb(226, 137, 100);\">|<\/span><span style=\"color: rgb(226, 137, 100);\">|<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> == <span style=\"color: rgb(101, 176, 66);\">'--help'<\/span> ]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    cat <span style=\"color: rgb(226, 137, 100);\">&lt;<\/span><span style=\"color: rgb(226, 137, 100);\">&lt;<\/span> EOF\nArguments: mysql-export.sh [-h<span style=\"color: rgb(226, 137, 100);\">|<\/span>--help] [--stdout] [--tables=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>table_name<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>,<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>table_name<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>] [--add-drop] [--apache-user=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>apache_http_user<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>] [--apache-password=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>apache_http_password<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>] [--phpmyadmin-user=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>phpmyadmin_user<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>] [--phpmyadmin-password=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>phpmyadmin_password<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>] [--database=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>database<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>] [--host=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>phpmyadmin_host<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>] [--use-keychain]\n       -h, --help: Print <span style=\"color: rgb(218, 208, 133);\">help<\/span>\n       --stdout: Write SQL (gzipped) <span style=\"color: rgb(226, 137, 100);\">in<\/span> stdout\n       --tables: Export only particular tables\n       --add-drop: add DROP TABLE IF EXISTS to every exporting table\n       --apache-user=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>apache_http_user<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>: Apache HTTP autorization user\n       --apache-password=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>apache_http_password<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>: Apache HTTP autorization password or keychain entry name <span style=\"color: rgb(226, 137, 100);\">if<\/span> --use-keychain\n       --phpmyadmin-user=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>phpmyadmin_user<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>: PhpMyAdmin user\n       --phpmyadmin-password=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>phpmyadmin_password<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>: PhpMyAdmin password or keychain entry name <span style=\"color: rgb(226, 137, 100);\">if<\/span> --use-keychain\n       --database=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>database<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>: Database to be exported\n       --host=<span style=\"color: rgb(226, 137, 100);\">&lt;<\/span>phpmyadmin_host<span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>: PhpMyAdmin host\n       --use-keychain: Use Mac OS X keychain to get passwords from. In that <span style=\"color: rgb(226, 137, 100);\">case<\/span> --apache-password and --phpmyadmin-password will be used as account name <span style=\"color: rgb(226, 137, 100);\">for<\/span> <span style=\"color: rgb(62, 135, 227);\">search<\/span> <span style=\"color: rgb(226, 137, 100);\">in<\/span> Mac Os X keychain.\n\n Common uses: mysql-export.sh --tables=hotel_content_provider --add-drop --database=hs --stdout --use-keychain --apache-user=betatester --phpmyadmin-user=hs --apache-password=www.example.com<span style=\"color: rgb(51, 135, 204);\">\\ <\/span><span style=\"color: rgb(51, 135, 204);\">\\(<\/span>me<span style=\"color: rgb(51, 135, 204);\">\\)<\/span> --phpmyadmin-password=phpmyadmin.example.com --host=https:\/\/www.example.com\/phpmyadmin <span style=\"color: rgb(226, 137, 100);\">|<\/span> gunzip <span style=\"color: rgb(226, 137, 100);\">|<\/span> mysql -u root -p testtable\n  exports and imports on the fly <span style=\"color: rgb(226, 137, 100);\">in<\/span> <span style=\"color: rgb(153, 207, 80);\">local<\/span> db\nEOF\n<span style=\"color: rgb(218, 208, 133);\">exit<\/span> 0\n\n  <span style=\"color: rgb(226, 137, 100);\">elif<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> == <span style=\"color: rgb(101, 176, 66);\">'--stdout'<\/span> ]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    stdin=1\n  <span style=\"color: rgb(226, 137, 100);\">elif<\/span> [[ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> <span style=\"color: rgb(226, 137, 100);\">=~<\/span> --tables ]]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    export_tables=1\n    db_tables=<span style=\"color: rgb(62, 135, 227);\">$arg<\/span>\n  <span style=\"color: rgb(226, 137, 100);\">elif<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> == <span style=\"color: rgb(101, 176, 66);\">'--compression=off'<\/span> ]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    COMPRESSION=off\n  <span style=\"color: rgb(226, 137, 100);\">elif<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> == <span style=\"color: rgb(101, 176, 66);\">'--add-drop'<\/span> ]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    add_drop=1\n  <span style=\"color: rgb(226, 137, 100);\">elif<\/span> [[ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> <span style=\"color: rgb(226, 137, 100);\">=~<\/span> --apache-user ]] <span style=\"color: rgb(226, 137, 100);\">&amp;&amp;<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$APACHE_USER<\/span> -eq 0 ]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    APACHE_USER=<span style=\"color: rgb(62, 135, 227);\">${arg<span style=\"color: rgb(226, 137, 100);\">:<\/span>14}<\/span>\n  <span style=\"color: rgb(226, 137, 100);\">elif<\/span> [[ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> <span style=\"color: rgb(226, 137, 100);\">=~<\/span> --apache-password ]] <span style=\"color: rgb(226, 137, 100);\">&amp;&amp;<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$APACHE_PASSWD<\/span> -eq 0 ]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    APACHE_PASSWD=<span style=\"color: rgb(62, 135, 227);\">${arg<span style=\"color: rgb(226, 137, 100);\">:<\/span>18}<\/span>\n  <span style=\"color: rgb(226, 137, 100);\">elif<\/span> [[ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> <span style=\"color: rgb(226, 137, 100);\">=~<\/span> --phpmyadmin-user ]] <span style=\"color: rgb(226, 137, 100);\">&amp;&amp;<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$PHPMYADMIN_USER<\/span> -eq 0 ]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    PHPMYADMIN_USER=<span style=\"color: rgb(62, 135, 227);\">${arg<span style=\"color: rgb(226, 137, 100);\">:<\/span>18}<\/span>\n  <span style=\"color: rgb(226, 137, 100);\">elif<\/span> [[ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> <span style=\"color: rgb(226, 137, 100);\">=~<\/span> --phpmyadmin-password ]] <span style=\"color: rgb(226, 137, 100);\">&amp;&amp;<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$PHPMYADMIN_PASSWD<\/span> -eq 0 ]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    PHPMYADMIN_PASSWD=<span style=\"color: rgb(62, 135, 227);\">${arg<span style=\"color: rgb(226, 137, 100);\">:<\/span>22}<\/span>\n  <span style=\"color: rgb(226, 137, 100);\">elif<\/span> [[ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> <span style=\"color: rgb(226, 137, 100);\">=~<\/span> --database ]] <span style=\"color: rgb(226, 137, 100);\">&amp;&amp;<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$DATABASE<\/span> -eq 0 ]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    DATABASE=<span style=\"color: rgb(62, 135, 227);\">${arg<span style=\"color: rgb(226, 137, 100);\">:<\/span>11}<\/span>\n  <span style=\"color: rgb(226, 137, 100);\">elif<\/span> [[ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> <span style=\"color: rgb(226, 137, 100);\">=~<\/span> --host ]] <span style=\"color: rgb(226, 137, 100);\">&amp;&amp;<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$REMOTE_HOST<\/span> -eq 0 ]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    REMOTE_HOST=<span style=\"color: rgb(62, 135, 227);\">${arg<span style=\"color: rgb(226, 137, 100);\">:<\/span>7}<\/span>\n  <span style=\"color: rgb(226, 137, 100);\">elif<\/span> [[ <span style=\"color: rgb(62, 135, 227);\">$arg<\/span> <span style=\"color: rgb(226, 137, 100);\">==<\/span> <span style=\"color: rgb(101, 176, 66);\">'--use-keychain'<\/span> ]]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    USE_KEYCHAIN=1\n  <span style=\"color: rgb(226, 137, 100);\">fi<\/span>\n<span style=\"color: rgb(226, 137, 100);\">done<\/span>\n\n<span style=\"color: rgb(226, 137, 100);\">if<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$USE_KEYCHAIN<\/span> -eq 1 ]\n<span style=\"color: rgb(226, 137, 100);\">then<\/span>\n  APACHE_PASSWD=<span style=\"color: rgb(101, 176, 66);\">`security <span style=\"color: rgb(226, 137, 100);\">2&gt;&amp;1<\/span> <span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>\/dev\/null find-internet-password -gs <span style=\"color: rgb(138, 154, 149);\">$APACHE_PASSWD<\/span> <span style=\"color: rgb(226, 137, 100);\">|<\/span> sed -e 's\/password: \"\\(.*\\)\"\/\\1\/g'`<\/span>\n  PHPMYADMIN_PASSWD=<span style=\"color: rgb(101, 176, 66);\">`security <span style=\"color: rgb(226, 137, 100);\">2&gt;&amp;1<\/span> <span style=\"color: rgb(226, 137, 100);\">&gt;<\/span>\/dev\/null find-internet-password -g -l <span style=\"color: rgb(138, 154, 149);\">$PHPMYADMIN_PASSWD<\/span> <span style=\"color: rgb(226, 137, 100);\">|<\/span> sed -e 's\/password: \"\\(.*\\)\"\/\\1\/g'`<\/span>\n<span style=\"color: rgb(226, 137, 100);\">fi<\/span>\n\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">###############################################################<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># First login and fetch the cookie which will be used later<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">###############################################################<\/span>\n\nMKTEMP=\/bin\/tempfile\n<span style=\"color: rgb(226, 137, 100);\">if<\/span> [ <span style=\"color: rgb(226, 137, 100);\">!<\/span> -x <span style=\"color: rgb(62, 135, 227);\">$MKTEMP<\/span> ]<span style=\"color: rgb(226, 137, 100);\">;<\/span> <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    MKTEMP=<span style=\"color: rgb(101, 176, 66);\">`which mktemp`<\/span>\n    result=<span style=\"color: rgb(101, 176, 66);\">$(<span style=\"color: rgb(138, 154, 149);\">$MKTEMP<\/span> \"<span style=\"color: rgb(138, 154, 149);\">$TMP_FOLDER<\/span>\/phpmyadmin_export.XXXXXX.tmp\")<\/span>\n<span style=\"color: rgb(226, 137, 100);\">else<\/span>\n    result=<span style=\"color: rgb(101, 176, 66);\">$(<span style=\"color: rgb(138, 154, 149);\">$MKTEMP<\/span> \"<span style=\"color: rgb(138, 154, 149);\">$TMP_FOLDER<\/span>\/phpmyadmin_export.<span style=\"color: rgb(138, 154, 149);\">$RANDOM<\/span>.tmp\")<\/span>\n<span style=\"color: rgb(226, 137, 100);\">fi<\/span>\n\napache_auth_params=<span style=\"color: rgb(101, 176, 66);\">\"--anyauth -u<span style=\"color: rgb(138, 154, 149);\">$APACHE_USER<\/span>:<span style=\"color: rgb(138, 154, 149);\">$APACHE_PASSWD<\/span>\"<\/span>\n\ncurl -s -k -D <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/curl.headers -L -c <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/cookies.txt <span style=\"color: rgb(62, 135, 227);\">$apache_auth_params<\/span> <span style=\"color: rgb(62, 135, 227);\">$REMOTE_HOST<\/span>\/index.php <span style=\"color: rgb(226, 137, 100);\">&gt;<\/span> <span style=\"color: rgb(62, 135, 227);\">$result<\/span>\n    token=<span style=\"color: rgb(101, 176, 66);\">$(grep \"navigation.php\" <span style=\"color: rgb(138, 154, 149);\">$result<\/span> <span style=\"color: rgb(226, 137, 100);\">|<\/span> grep token <span style=\"color: rgb(226, 137, 100);\">|<\/span> sed \"s\/^.*token=\/\/\" <span style=\"color: rgb(226, 137, 100);\">|<\/span> sed \"s\/<span style=\"color: rgb(221, 242, 164);\">\\\"<\/span>$\/\/\")<\/span>\n\n    cookie=<span style=\"color: rgb(101, 176, 66);\">$(cat <span style=\"color: rgb(138, 154, 149);\">$TMP_FOLDER<\/span>\/cookies.txt <span style=\"color: rgb(226, 137, 100);\">|<\/span> cut  -f 6-7 <span style=\"color: rgb(226, 137, 100);\">|<\/span> grep phpMyAdmin <span style=\"color: rgb(226, 137, 100);\">|<\/span> cut -f 2)<\/span>\n\n    entry_params=<span style=\"color: rgb(101, 176, 66);\">\"-d <span style=\"color: rgb(221, 242, 164);\">\\\"<\/span>phpMyAdmin=<span style=\"color: rgb(138, 154, 149);\">$cookie<\/span>&amp;phpMyAdmin=<span style=\"color: rgb(138, 154, 149);\">$cookie<\/span>&amp;pma_username=<span style=\"color: rgb(138, 154, 149);\">$PHPMYADMIN_USER<\/span>&amp;pma_password=<span style=\"color: rgb(138, 154, 149);\">$PHPMYADMIN_PASSWD<\/span>&amp;server=1&amp;phpMyAdmin=<span style=\"color: rgb(138, 154, 149);\">$cookie<\/span>&amp;lang=en-utf-8&amp;convcharset=utf-8&amp;collation_connection=utf8_general_ci&amp;token=<span style=\"color: rgb(138, 154, 149);\">$token<\/span>&amp;input_go=Go<span style=\"color: rgb(221, 242, 164);\">\\\"<\/span>\"<\/span>\n\ncurl -s -S -k -L  -D <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/curl.headers -b <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/cookies.txt -c <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/cookies.txt <span style=\"color: rgb(62, 135, 227);\">$apache_auth_params<\/span> <span style=\"color: rgb(62, 135, 227);\">$entry_params<\/span> <span style=\"color: rgb(62, 135, 227);\">$REMOTE_HOST<\/span>\/index.php <span style=\"color: rgb(226, 137, 100);\">&gt;<\/span> <span style=\"color: rgb(62, 135, 227);\">$result<\/span>\n\n<span style=\"color: rgb(226, 137, 100);\">if<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$?<\/span> -ne 0 ]\n<span style=\"color: rgb(226, 137, 100);\">then<\/span>\n     <span style=\"color: rgb(218, 208, 133);\">echo<\/span> <span style=\"color: rgb(101, 176, 66);\">\"Curl Error on : curl <span style=\"color: rgb(138, 154, 149);\">$entry_params<\/span> -s -k -D <span style=\"color: rgb(138, 154, 149);\">$TMP_FOLDER<\/span>\/curl.headers -L -c <span style=\"color: rgb(138, 154, 149);\">$TMP_FOLDER<\/span>\/cookies.txt <span style=\"color: rgb(138, 154, 149);\">$REMOTE_HOST<\/span>\/index.php. Check contents of <span style=\"color: rgb(138, 154, 149);\">$result<\/span>\"<\/span> <span style=\"color: rgb(226, 137, 100);\">&gt;&amp;2<\/span>\n     <span style=\"color: rgb(218, 208, 133);\">exit<\/span> 1\n<span style=\"color: rgb(226, 137, 100);\">fi<\/span>\ngrep -q <span style=\"color: rgb(101, 176, 66);\">\"HTTP\/1.1 200 OK\"<\/span> <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/curl.headers\n<span style=\"color: rgb(226, 137, 100);\">if<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$?<\/span> -ne 0 ]\n<span style=\"color: rgb(226, 137, 100);\">then<\/span>\n         <span style=\"color: rgb(218, 208, 133);\">echo<\/span> -n <span style=\"color: rgb(101, 176, 66);\">\"Error : couldn't login to phpMyadmin on <span style=\"color: rgb(138, 154, 149);\">$REMOTE_HOST<\/span>\/index.php\"<\/span> <span style=\"color: rgb(226, 137, 100);\">&gt;&amp;2<\/span>\n         grep <span style=\"color: rgb(101, 176, 66);\">\"HTTP\/1.1 \"<\/span> <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/curl.headers <span style=\"color: rgb(226, 137, 100);\">&gt;&amp;2<\/span>\n         <span style=\"color: rgb(218, 208, 133);\">exit<\/span> 1\n<span style=\"color: rgb(226, 137, 100);\">fi<\/span>\n\nmd5cookie=<span style=\"color: rgb(62, 135, 227);\">$token<\/span>\n\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"token=<span style=\"color: rgb(138, 154, 149);\">$md5cookie<\/span>\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;export_type=server\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;export_method=quick\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;quick_or_custom=custom\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;db_select[]=<span style=\"color: rgb(138, 154, 149);\">$DATABASE<\/span>\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;output_format=sendit\"<\/span>\n\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;what=sql\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;codegen_structure_or_data=data\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;codegen_format=0\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;csv_separator=%3B\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;csv_enclosed=%22\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;csv_escaped=%5C\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;csv_terminated=AUTO\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;csv_null=NULL\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;csv_structure_or_data=data\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;excel_null=NULL\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;excel_edition=win\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;excel_structure_or_data=data\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;htmlword_structure=something\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;htmlword_structure_or_data=structure_and_data\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;htmlword_null=NULL\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;latex_caption=something\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;latex_structure=something\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;latex_structure_caption=Structure+of+table+__TABLE__\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;latex_structure_continued_caption=Structure+of+table+__TABLE__+%28continued%29\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;latex_structure_label=tab%3A__TABLE__-structure\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;latex_comments=something\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;latex_data=something\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;latex_columns=something\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;latex_data_caption=Content+of+table+__TABLE__\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;latex_data_continued_caption=Content+of+table+__TABLE__+%28continued%29\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;latex_data_label=tab%3A__TABLE__-data\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;latex_null=%5Ctextit%7BNULL%7D\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;mediawiki_structure_or_data=data\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;ods_null=NULL\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;ods_structure_or_data=data\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;odt_structure=something\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;odt_comments=something\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;odt_data=something\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;odt_columns=something\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;odt_null=NULL\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;pdf_report_title=\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;pdf_data=1\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;php_array_structure_or_data=data\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_header_comment=\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_include_comments=something\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_compatibility=NONE\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_structure_or_data=structure_and_data\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_if_not_exists=something\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_auto_increment=something\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_backquotes=something\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_data=something\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_columns=something\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_extended=something\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_max_query_size=50000\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_hex_for_blob=something\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_type=INSERT\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;texytext_structure=something\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;texytext_data=something\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;texytext_null=NULL\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;xls_null=NULL\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;xls_structure_or_data=data\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># post_params=\"$post_params&amp;xlsx_null=NULL\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;xlsx_structure_or_data=data\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;yaml_structure_or_data=data\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;asfile=sendit\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;filename_template=__SERVER__\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;remember_template=on\"<\/span>\npost_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;charset_of_file=utf-8\"<\/span>\n\n<span style=\"color: rgb(226, 137, 100);\">if<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$add_drop<\/span> -eq 1 ]\n<span style=\"color: rgb(226, 137, 100);\">then<\/span>\n  post_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_drop_table=something\"<\/span>\n  post_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;sql_structure=data\"<\/span>\n<span style=\"color: rgb(226, 137, 100);\">fi<\/span>\n\n<span style=\"color: rgb(226, 137, 100);\">if<\/span> [ <span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$COMPRESSION<\/span>\"<\/span> = <span style=\"color: rgb(101, 176, 66);\">\"on\"<\/span> ]\n<span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    post_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;compression=gzip\"<\/span>\n<span style=\"color: rgb(226, 137, 100);\">else<\/span>\n    post_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;compression=none\"<\/span>\n<span style=\"color: rgb(226, 137, 100);\">fi<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#&amp;sql_hex_for_binary=something<\/span>\n\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#2.7.0-pl2<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#post_params=\"$post_params&amp;sql_structure=structure\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#post_params=\"$post_params&amp;sql_auto_increment=1\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#post_params=\"$post_params&amp;sql_compat=NONE\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#post_params=\"$post_params&amp;use_backquotes=1\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#post_params=\"$post_params&amp;sql_data=data\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#post_params=\"$post_params&amp;hexforbinary=yes\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#post_params=\"$post_params&amp;sql_type=insert\"<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#post_params=\"$post_params&amp;lang=fr-utf-8&amp;server=1&amp;collation_connection=utf8_general_ci&amp;buttonGo=Ex\u00e9cuter\"<\/span>\n\n<span style=\"color: rgb(226, 137, 100);\">if<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$export_tables<\/span> -eq 1 ]\n<span style=\"color: rgb(226, 137, 100);\">then<\/span>\n  db_tables=<span style=\"color: rgb(62, 135, 227);\">${db_tables<span style=\"color: rgb(226, 137, 100);\">\/<\/span>=<span style=\"color: rgb(226, 137, 100);\">\/<\/span>table_select[]=}<\/span>\n  db_tables=<span style=\"color: rgb(62, 135, 227);\">${db_tables<span style=\"color: rgb(226, 137, 100);\">\/<\/span><span style=\"color: rgb(226, 137, 100);\">\/<\/span>,<span style=\"color: rgb(226, 137, 100);\">\/<\/span>&amp;table_select[]=}<\/span>\n  db_tables=<span style=\"color: rgb(62, 135, 227);\">${db_tables<span style=\"color: rgb(226, 137, 100);\">:<\/span>8}<\/span>\n\n  post_params=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>&amp;db=<span style=\"color: rgb(138, 154, 149);\">$DATABASE<\/span>&amp;export_type=database&amp;<span style=\"color: rgb(138, 154, 149);\">$db_tables<\/span>&amp;filename_template=__DB__\"<\/span>\n\n<span style=\"color: rgb(226, 137, 100);\">fi<\/span>\n\n<span style=\"color: rgb(226, 137, 100);\">if<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$stdin<\/span> -eq 1 ]\n<span style=\"color: rgb(226, 137, 100);\">then<\/span>\n  curl -g -s -S -k -D <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/curl.headers -L -b <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/cookies.txt <span style=\"color: rgb(62, 135, 227);\">$apache_auth_params<\/span> -d <span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>\"<\/span> <span style=\"color: rgb(62, 135, 227);\">$REMOTE_HOST<\/span>\/export.php\n<span style=\"color: rgb(226, 137, 100);\">else<\/span>\n  curl -g -s -S -O -k -D <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/curl.headers -L -b <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/cookies.txt <span style=\"color: rgb(62, 135, 227);\">$apache_auth_params<\/span> -d <span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$post_params<\/span>\"<\/span> <span style=\"color: rgb(62, 135, 227);\">$REMOTE_HOST<\/span>\/export.php\n\n  grep -q <span style=\"color: rgb(101, 176, 66);\">\"Content-Disposition: attachment\"<\/span> <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/curl.headers\n  <span style=\"color: rgb(226, 137, 100);\">if<\/span> [ <span style=\"color: rgb(62, 135, 227);\">$?<\/span> -eq 0 ]\n  <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n    filename=<span style=\"color: rgb(101, 176, 66);\">\"$(<span style=\"color: rgb(218, 208, 133);\">echo<\/span> <span style=\"color: rgb(138, 154, 149);\">$REMOTE_HOST<\/span> <span style=\"color: rgb(226, 137, 100);\">|<\/span> sed 's\/\\.\/-\/g; s|^http[s]:\/\/||g; s|\/|-|g;')_<span style=\"color: rgb(138, 154, 149);\">${DATABASE}<\/span>_$(date  +%Y%m%d%H%M).sql\"<\/span>\n\n    <span style=\"color: rgb(226, 137, 100);\">if<\/span> [ <span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$COMPRESSION<\/span>\"<\/span> = <span style=\"color: rgb(101, 176, 66);\">\"on\"<\/span> ]\n        <span style=\"color: rgb(226, 137, 100);\">then<\/span>\n            filename=<span style=\"color: rgb(101, 176, 66);\">\"<span style=\"color: rgb(138, 154, 149);\">$filename<\/span>.gz\"<\/span>\n            mv <span style=\"color: rgb(153, 207, 80);\">export<\/span>.php backup_mysql_<span style=\"color: rgb(62, 135, 227);\">$filename<\/span>\n            <span style=\"color: rgb(218, 208, 133);\">echo<\/span> <span style=\"color: rgb(101, 176, 66);\">\"Saved: backup_mysql_<span style=\"color: rgb(138, 154, 149);\">$filename<\/span>\"<\/span>\n    <span style=\"color: rgb(226, 137, 100);\">else<\/span>\n            mv <span style=\"color: rgb(153, 207, 80);\">export<\/span>.php backup_mysql_<span style=\"color: rgb(62, 135, 227);\">$filename<\/span>\n            gzip backup_mysql_<span style=\"color: rgb(62, 135, 227);\">$filename<\/span>\n            <span style=\"color: rgb(218, 208, 133);\">echo<\/span> <span style=\"color: rgb(101, 176, 66);\">\"Saved: backup_mysql_<span style=\"color: rgb(138, 154, 149);\">$filename<\/span>.gz\"<\/span>\n    <span style=\"color: rgb(226, 137, 100);\">fi<\/span>\n  <span style=\"color: rgb(226, 137, 100);\">fi<\/span>\n<span style=\"color: rgb(226, 137, 100);\">fi<\/span>\n\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\"># remove the old backups and keep the 10 younger ones.<\/span>\n<span style=\"color: rgb(174, 174, 174); font-style: italic;\">#ls -1 backup_mysql_*${DATABASE}_*.gz | sort -u | head -n-10 | xargs -r rm -v<\/span>\n\nrm -f <span style=\"color: rgb(62, 135, 227);\">$result<\/span>\nrm -f <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/curl.headers\nrm -f <span style=\"color: rgb(62, 135, 227);\">$TMP_FOLDER<\/span>\/cookies.txt<\/pre>\n\n\n<div class=\"wp-block-file\"><a href=\"\/blog\/wp-content\/uploads\/cms_xe\/bin0074\">mysql-export.sh<\/a><a href=\"\/blog\/wp-content\/uploads\/cms_xe\/bin0074\" class=\"wp-block-file__button\" download>\ub2e4\uc6b4\ub85c\ub4dc<\/a><\/div>\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[10],"tags":[],"class_list":["post-805","post","type-post","status-publish","format-standard","hentry","category-computing_database"],"_links":{"self":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=805"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/805\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}