使用Vagrant的快照功能可以很方便快速的创建当前虚拟机的一个临时备份状态,在进行重要操作时可以先创建一个快照以便在操作失误后快速恢复。

安装Vagrant快照插件:

vagrant plugin install vagrant-vbox-snapshot
$ vagrant snapshot
Usage: vagrant snapshot <command> [<args>]

Available subcommands:
     back
     delete
     go
     list
     take

For help on any individual command run `vagrant snapshot <command> -h

使用方法:

  • 创建一个快照
vagrant snapshot take "Name"
  • 查看快照列表
vagrant snapshot list
  • 从指定快照中恢复
vagrant snapshot go "Name"
  • 删除一个快照
vagrant snapshot delete "Name"

venmos
462 声望15 粉丝

Maccon, Emacscon, Lolicon, ACG. False geek, Looks like a quiet guy. Love open source, Loves photography and outdoor sports. Favorite programming language is Ruby and Lisp.