{"id":29586656,"url":"https://github.com/basecamp/snapshot","last_synced_at":"2025-07-20T03:31:17.455Z","repository":{"id":1490308,"uuid":"1739167","full_name":"basecamp/snapshot","owner":"basecamp","description":"A rails plugin that provides tasks for creating and restoring snapshots of development data.","archived":false,"fork":false,"pushed_at":"2011-07-18T15:12:10.000Z","size":98,"stargazers_count":35,"open_issues_count":1,"forks_count":7,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-07-18T05:34:51.548Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/basecamp.png","metadata":{"files":{"readme":"README.mkd","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}},"created_at":"2011-05-12T16:21:18.000Z","updated_at":"2025-06-01T03:44:00.000Z","dependencies_parsed_at":"2022-08-16T13:25:10.959Z","dependency_job_id":null,"html_url":"https://github.com/basecamp/snapshot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/basecamp/snapshot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fsnapshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fsnapshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fsnapshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fsnapshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basecamp","download_url":"https://codeload.github.com/basecamp/snapshot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fsnapshot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266063099,"owners_count":23870716,"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":[],"created_at":"2025-07-20T03:30:58.476Z","updated_at":"2025-07-20T03:31:17.437Z","avatar_url":"https://github.com/basecamp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Snapshot\n========\n\nThe snapshot plugin adds two new rake tasks that make it easy for you to take\na snapshot of your existing (development) database, and restore it again.\n\nWhy would you want this?\n\nImagine you are developing an app. You've spent a few hours filling your\ndevelopment DB with data so that you can design a particular UI scenario.\nNow, though, you need to design another scenario, which requires a different\ndataset, and you are loathe to lose the data you so laboriously entered.\n\nThe snapshot plugin saves the day:\n\n    $ rake db:snapshot\n\nThis creates a db/snapshot file (which records all the data in your DB),\nand a db/snapshot.schema file (which records the state of the schema when\nthe snapshot was taken). At any time, then, you can restore that snapshot:\n\n    $ rake db:snapshot:restore\n\nThis will erase the existing DB, restore the db/snapshot.schema schema,\nand then load the data. If there are any pending migrations, it will then\nrun those, and then regenerate the snapshot so that it stays at the latest\nschema.\n\nYou can pass a different snapshot file to use as a parameter, to either\ntask:\n\n    $ rake db:snapshot[scenarios/real-estate]\n    ...\n    $ rake db:snapshot:restore[scenarios/telemarketer]\n\n\nLimitations\n-----------\n\nThe current version will probably fail when there are foreign key constraints,\nsince the order the tables and rows are restored is not guaranteed to be in\nany particular order.\n\nAlso, even moderately large data sets (e.g. multiple thousands of rows) may\nresult in poor performance during snapshot and restore, since the data is all\nloaded into memory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasecamp%2Fsnapshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasecamp%2Fsnapshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasecamp%2Fsnapshot/lists"}