{"_id":"54fda39021538c21006c49af","version":{"_id":"54fda38e21538c21006c49a6","__v":3,"forked_from":"54eb4535615ffc19003059f0","project":"545e249c7ca5470800b3a1b2","createdAt":"2015-03-09T13:43:42.927Z","releaseDate":"2015-03-09T13:43:42.927Z","categories":["54fda38f21538c21006c49a7","54fda38f21538c21006c49a8","54fda38f21538c21006c49a9","54fda38f21538c21006c49aa","54fda38f21538c21006c49ab","54fda3d347f93619001d2ae2","54fea8975c4ab10d00ef4279"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"0.5.0","version":"0.5.0"},"user":"545e246f7ca5470800b3a1b1","project":"545e249c7ca5470800b3a1b2","__v":0,"category":{"_id":"54fda38f21538c21006c49a8","version":"54fda38e21538c21006c49a6","__v":2,"pages":["54fda39021538c21006c49ac","54fda39021538c21006c49ad","54fda39021538c21006c49ae","54fda39021538c21006c49af","554cb5c01f5dd20d008a7bdd"],"project":"545e249c7ca5470800b3a1b2","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-11-08T16:56:01.271Z","from_sync":false,"order":1,"slug":"commands","title":"Commands"},"githubsync":"","metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-01-06T13:38:36.996Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"never","params":[],"url":""},"isReference":false,"order":4,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"postgresql_dump\"\n}\n[/block]\nDumps a PostgreSQL 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    postgresql_dump user: \\\"postgresql-user\\\", password: \\\"secret\\\", login_host: \\\"localhost\\\"\\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\",\n    \"0-0\": \"`login_host`\",\n    \"0-1\": \"The host to log into. While this information seems redundant, it may be sometimes required to match the appropriate authentication method defined in the `pg_hba.conf` file. See [there](http://www.postgresql.org/docs/9.4/static/auth-pg-hba-conf.html) for more\",\n    \"2-0\": \"`password`\",\n    \"2-1\": \"The password to provide\",\n    \"2-2\": \"Required: no\",\n    \"h-2\": \"\",\n    \"1-0\": \"`user`\",\n    \"1-1\": \"The user account to use\",\n    \"1-2\": \"Required: no\",\n    \"3-0\": \"`sudo_as`\",\n    \"3-1\": \"Run the `pg_dump` command as another system user\",\n    \"3-2\": \"Required: no\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]","excerpt":"Create PostgreSQL backup artifacts","slug":"postgresql","type":"basic","title":"PostgreSQL"}

PostgreSQL

Create PostgreSQL backup artifacts

[block:api-header] { "type": "basic", "title": "postgresql_dump" } [/block] Dumps a PostgreSQL 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 postgresql_dump user: \"postgresql-user\", password: \"secret\", login_host: \"localhost\"\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", "0-0": "`login_host`", "0-1": "The host to log into. While this information seems redundant, it may be sometimes required to match the appropriate authentication method defined in the `pg_hba.conf` file. See [there](http://www.postgresql.org/docs/9.4/static/auth-pg-hba-conf.html) for more", "2-0": "`password`", "2-1": "The password to provide", "2-2": "Required: no", "h-2": "", "1-0": "`user`", "1-1": "The user account to use", "1-2": "Required: no", "3-0": "`sudo_as`", "3-1": "Run the `pg_dump` command as another system user", "3-2": "Required: no" }, "cols": 3, "rows": 4 } [/block]