knife ec backup
knife ec backup is the primary tool used to export Chef Infra Server data for migration into Chef 360 Platform.
Use this command together with knife ec restore workflows when you need full backup and restore operations.
Install
You can run knife ec backup through the Habitat package:
hab pkg install chef/knife-ec-backup -bf
Syntax
After installation, prefix all knife ec backup commands with:
hab pkg exec chef/knife-ec-backup
Common flags
Use the following flags in most migration scenarios:
--webui-key- Path to
webui_priv.pemon the Chef Infra Server. -s,--server-url- Chef Infra Server URL.
-u,--user- Admin user for backup operations, typically
pivotal. -k,--key- Path to the admin user’s private key.
--with-key-sql- Includes all user and client keys, not only default keys.
Common use cases
Create a full backup
hab pkg exec chef/knife-ec-backup knife ec backup backup_$(date '+%Y%m%d%H%M%s') \
--webui-key /etc/opscode/webui_priv.pem \
--with-key-sql \
-s https://chef.example.com \
-u pivotal \
-k /etc/opscode/pivotal.pem
Create a backup for migration to DSM
Use --with-key-sql for migration backups so user and client accounts with multiple keys are exported correctly.
Reference
For complete command syntax and advanced options, see the knife-ec-backup README.