{"id":19219255,"url":"https://github.com/chassis/db_backup","last_synced_at":"2025-05-13T00:32:07.431Z","repository":{"id":68352361,"uuid":"74728837","full_name":"Chassis/db_backup","owner":"Chassis","description":"Backup and restore your database automatically","archived":false,"fork":false,"pushed_at":"2020-08-13T08:51:14.000Z","size":20,"stargazers_count":6,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T05:02:22.901Z","etag":null,"topics":["backup","chassis","chassis-extension","machine","wordpress"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Chassis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-25T05:40:43.000Z","updated_at":"2020-06-25T17:15:03.000Z","dependencies_parsed_at":"2023-02-27T16:15:14.750Z","dependency_job_id":null,"html_url":"https://github.com/Chassis/db_backup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chassis%2Fdb_backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chassis%2Fdb_backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chassis%2Fdb_backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chassis%2Fdb_backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chassis","download_url":"https://codeload.github.com/Chassis/db_backup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249958811,"owners_count":21351718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","chassis","chassis-extension","machine","wordpress"],"created_at":"2024-11-09T14:30:10.432Z","updated_at":"2025-04-20T20:32:20.775Z","avatar_url":"https://github.com/Chassis.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Database Backup Extension for Chassis\n\nThis Chassis extension backs up your database when you destroy your Vagrant box, and restores it when you recreate the machine.\n\nSince WordPress stores all data in MySQL (except uploads, which are stored in a shared folder), this allows you to safely destroy Chassis machines when you're not using them, without losing any data.\n\n## Installation\n\nClone this repository into your Chassis `extensions` directory:\n\n```sh\n$ cd extensions\n$ git clone https://github.com/Chassis/db_backup\n```\n\n## Using\n\nSimply destroy your box as usual, and answer yes when prompted to back up:\n\n```\n$ vagrant destroy\n    default: Do you want to backup the database before destroying? [Y/n] y\n==\u003e default: stdin is not a tty\n==\u003e default: Backup saved to chassis-backup.sql\n    default: Are you sure you want to destroy the 'default' VM? [y/N] y\n==\u003e default: Forcing shutdown of VM...\n==\u003e default: Destroying VM and associated drives...\n```\n\n**Important note:** If you do not see \"Backup saved to chassis-backup.sql\", your database has not been backed up. Ensure you are using a version of Chassis published after 2016-11-25.\n\nWhen you recreate the machine later, your backup will be automatically restored:\n\n```\n$ vagrant up\n[...]\n==\u003e default: Notice: /Stage[main]/Main/Chassis::Wp[vagrant.local]/Chassis::Site[vagrant.local]/Mysql::Db[wordpress]/Database[wordpress]/ensure: created\n==\u003e default: Notice: /Stage[main]/Main/Chassis::Wp[vagrant.local]/Chassis::Site[vagrant.local]/Mysql::Db[wordpress]/Database_user[wordpress@localhost]/ensure: created\n==\u003e default: Notice: /Stage[main]/Main/Chassis::Wp[vagrant.local]/Chassis::Site[vagrant.local]/Mysql::Db[wordpress]/Database_grant[wordpress@localhost/wordpress]/privileges: privileges changed '' to 'all'\n==\u003e default: Notice: /Stage[main]/Db-backup/Exec[wordpress-import]/returns: executed successfully\n[...]\n```\n\n## Configuration\n\nYou can optionally have a backup made when you run `vagrant halt` and `vagrant suspend`. To do this you can add the following into your yaml file.\n```\ndb-backup:\n    halt: yes\n    suspend: yes\n```\n\n## Windows Troubleshooting\n\n`bad interpreter: No such file or directory`\n\nThis can be fixed by doing either of the following:\n```\nvagrant ssh\nsed -i -e 's/\\r$//' /vagrant/extensions/db-backup/backup.sh\nexit\n```\nor\n1. Open `backup.sh` in NotePad++.\n2. Go to Edit -\u003e EOL Conversion -\u003e UNIX/OSX Format\n3. Save the file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchassis%2Fdb_backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchassis%2Fdb_backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchassis%2Fdb_backup/lists"}