{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"never","results":{"codes":[]},"params":[]},"next":{"description":"","pages":[]},"title":"MySQL / MariaDB","type":"basic","slug":"mysql","excerpt":"Create MySQL / MariaDB backup artifacts","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"mysql_dump\"\n}\n[/block]\nDumps a MySQL or MariaDB database.\n\n## Typical Usage\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"host \\\"db-host\\\", hostname: \\\"db.example.com\\\"\\n\\njob \\\"db-backup\\\" do\\n  resource \\\"database\\\", name: \\\"my-database\\\", host: \\\"db-host\\\"\\n  remotely as: \\\"user\\\" do\\n    mysql_dump user: \\\"mysql-user\\\", password: \\\"secret\\\"\\n  end\\nend\\n\\n\",\n      \"language\": \"ruby\",\n      \"name\": \"Sheepfile\"\n    }\n  ]\n}\n[/block]\n## Input resources\n\nResources of type `database` are allowed.\n\n## Output resource\n\nA resource of type `file`.\n\n## Command options\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Option\",\n    \"h-1\": \"Description\",\n    \"0-2\": \"Required: no\\nDefaults to: the current shell user\",\n    \"0-0\": \"`user`\",\n    \"0-1\": \"The user account to use.\",\n    \"1-0\": \"`password`\",\n    \"1-1\": \"The password to provide.\",\n    \"1-2\": \"Required: no\",\n    \"h-2\": \"\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]","updates":[],"order":3,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"54fda39021538c21006c49ac","project":"545e249c7ca5470800b3a1b2","__v":0,"user":"545e246f7ca5470800b3a1b1","version":{"version":"0.5.0","version_clean":"0.5.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["54fda38f21538c21006c49a7","54fda38f21538c21006c49a8","54fda38f21538c21006c49a9","54fda38f21538c21006c49aa","54fda38f21538c21006c49ab","54fda3d347f93619001d2ae2","54fea8975c4ab10d00ef4279"],"_id":"54fda38e21538c21006c49a6","__v":3,"createdAt":"2015-03-09T13:43:42.927Z","forked_from":"54eb4535615ffc19003059f0","project":"545e249c7ca5470800b3a1b2","releaseDate":"2015-03-09T13:43:42.927Z"},"createdAt":"2014-11-08T17:04:41.125Z","githubsync":"","category":{"sync":{"isSync":false,"url":""},"pages":["54fda39021538c21006c49ac","54fda39021538c21006c49ad","54fda39021538c21006c49ae","54fda39021538c21006c49af","554cb5c01f5dd20d008a7bdd"],"title":"Commands","slug":"commands","order":1,"from_sync":false,"reference":false,"_id":"54fda38f21538c21006c49a8","createdAt":"2014-11-08T16:56:01.271Z","version":"54fda38e21538c21006c49a6","__v":2,"project":"545e249c7ca5470800b3a1b2"}}

MySQL / MariaDB

Create MySQL / MariaDB backup artifacts

[block:api-header] { "type": "basic", "title": "mysql_dump" } [/block] Dumps a MySQL or MariaDB database. ## Typical Usage [block:code] { "codes": [ { "code": "host \"db-host\", hostname: \"db.example.com\"\n\njob \"db-backup\" do\n resource \"database\", name: \"my-database\", host: \"db-host\"\n remotely as: \"user\" do\n mysql_dump user: \"mysql-user\", password: \"secret\"\n end\nend\n\n", "language": "ruby", "name": "Sheepfile" } ] } [/block] ## Input resources Resources of type `database` are allowed. ## Output resource A resource of type `file`. ## Command options [block:parameters] { "data": { "h-0": "Option", "h-1": "Description", "0-2": "Required: no\nDefaults to: the current shell user", "0-0": "`user`", "0-1": "The user account to use.", "1-0": "`password`", "1-1": "The password to provide.", "1-2": "Required: no", "h-2": "" }, "cols": 3, "rows": 2 } [/block]