{"id":575,"date":"2016-04-25T14:34:03","date_gmt":"2016-04-25T13:34:03","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=575"},"modified":"2016-04-25T20:38:53","modified_gmt":"2016-04-25T19:38:53","slug":"backing-mysql-database-remotely","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2016\/04\/25\/backing-mysql-database-remotely\/","title":{"rendered":"Backing up a MySQL Database remotely"},"content":{"rendered":"<p>So, you might want to backup a MySQL database remotely, like one of our customers did today. This is relatively simply utilizing the inbuilt mysqldump facility. This customer in particular was running varnish in front of his apache2 webserver so setting up phpmyadmin wasn&#8217;t entirely straight forward for this non technical customer. It&#8217;s easily achievable with something like;<\/p>\n<h2>Specific database<\/h2>\n<pre>\r\nssh -l user 1.1.1.1 \"mysqldump -mysqldumpoptions databasenamegoeshere | gzip -3 -c\" > \/localpath\/localfile.sql.gz \r\n<\/pre>\n<h2>All databases<\/h2>\n<pre>\r\nmysqldump -uroot -ppassword -h162.13.137.249 > backup.sql\r\n<\/pre>\n<h2>The formatting of the command should look like<\/h2>\n<pre>\r\nmysqldump -u root -p[root_password] -h [hostname] [database_name] > dumpfilename.sql\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>So, you might want to backup a MySQL database remotely, like one of our customers did today. This is relatively simply utilizing the inbuilt mysqldump facility. This customer in particular was running varnish in front of his apache2 webserver so &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2016\/04\/25\/backing-mysql-database-remotely\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,19,15,7,2],"tags":[],"class_list":["post-575","post","type-post","status-publish","format-standard","hentry","category-automation","category-bash","category-cloud","category-management-tools","category-mysql"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/575","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=575"}],"version-history":[{"count":3,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/575\/revisions"}],"predecessor-version":[{"id":578,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/575\/revisions\/578"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}