github.com/hs0210/hashicorp-terraform@v0.11.12-beta1/website/docs/commands/state/push.html.md (about) 1 --- 2 layout: "commands-state" 3 page_title: "Command: state push" 4 sidebar_current: "docs-state-sub-push" 5 description: |- 6 The `terraform state push` command pushes items to the Terraform state. 7 --- 8 9 # Command: state push 10 11 The `terraform state push` command is used to manually upload a local 12 state file to [remote state](/docs/state/remote.html). This command also 13 works with local state. 14 15 This command should rarely be used. It is meant only as a utility in case 16 manual intervention is necessary with the remote state. 17 18 ## Usage 19 20 Usage: `terraform state push [options] PATH` 21 22 This command will push the state specified by PATH to the currently 23 configured [backend](/docs/backends). 24 25 If PATH is "-" then the state data to push is read from stdin. This data 26 is loaded completely into memory and verified prior to being written to 27 the destination state. 28 29 Terraform will perform a number of safety checks to prevent you from 30 making changes that appear to be unsafe: 31 32 * **Differing lineage**: If the "lineage" value in the state differs, 33 Terraform will not allow you to push the state. A differing lineage 34 suggests that the states are completely different and you may lose 35 data. 36 37 * **Higher remote serial**: If the "serial" value in the destination state 38 is higher than the state being pushed, Terraform will prevent the push. 39 A higher serial suggests that data is in the destination state that isn't 40 accounted for in the local state being pushed. 41 42 Both of these safety checks can be disabled with the `-force` flag. 43 **This is not recommended.** If you disable the safety checks and are 44 pushing state, the destination state will be overwritten.