fastmonkeys / stellar

Fast database snapshot and restore tool for development
MIT License
3.86k stars 119 forks source link

Adds a Replace command #37

Closed nealtodd closed 10 years ago

nealtodd commented 10 years ago

A convenience command that just wraps the remove and snapshot commands so that an existing named snapshot can be replaced in one step.

Use case is when using named snapshots to switch between development branches (e.g. naming the snapshots branchA, branchB, etc) but update the corresponding branch snapshot before you switch. In other words use Stellar to keep each branch's snapshot in its last used state, ready for when it's returned to.

Equivalent to stellar remove [name] followed by stellar snapshot [name]. Yes, that could just as easily be a command line alias, but it's a trivial addition.

(Also fixed a bug when calling stellar restore without a name and no existing snapshots.)

quantus commented 10 years ago

Thank you for the PR