Git Product home page Git Product logo

Comments (3)

geoffharcourt avatar geoffharcourt commented on September 15, 2024

Hi @tannakartikey I think this is a great idea, please go ahead with a pull request.

from parity.

tannakartikey avatar tannakartikey commented on September 15, 2024

@geoffharcourt I was thinking to introduce --cached flag to convey that the user wants to restore from the database downloaded earlier.

At the moment, the local database is deleted by the delete_local_temp_backup method after the database is restored. What should we do about it?

def restore_to_development
ensure_temp_directory_exists
download_remote_backup
wipe_development_database
restore_from_local_temp_backup
delete_local_temp_backup
delete_rails_production_environment_settings
end

from parity.

croaky avatar croaky commented on September 15, 2024

Possibly some ideas in here https://dancroak.com/heroku-postgres-restore-staging-development which is based originally on Parity code. My shell history frequently contains lines like:

db-restore-stag-from-prod-backup && db-backup-stag && db-download-stag-backup && db-restore-dev-from-downloaded-backup

The use case you described is the last command since there's a tmp/latest.backup sitting on the filesystem:

db-restore-dev-from-downloaded-backup

I'd recommend flagging delete_local_temp_backup as you say and considering whether the default should be to keep the backup on the filesystem.

from parity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.