# Rancher state details

**URL:** <https://forums.suse.com/t/rancher-state-details/8188>\
**Category:** Rancher 1.x\
**Created:** [January 10, 2018, 11:11am UTC](https://forums.suse.com/t/rancher-state-details/8188 "2018-01-10T11:11:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikemix](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/mikemix/32/3204_2.png) [@mikemix](https://forums.suse.com/u/mikemix)\
**Post date:** [January 10, 2018, 11:11am UTC](https://forums.suse.com/t/rancher-state-details/8188/1 "2018-01-10T11:11:52Z")

</div>

Hi. So we have this Rancher _rancher/server:stable_ up and running. Now we need to ensure the state is backed up somewhere 😉 my question is: is entire state of the Rancher contained inside the /var/lib/mysql volume so if I recreate rancher I have complete state as it was when the backup was made?

By the entire state I mean:

1. rancher specific settings
2. environments
3. stacks
4. container to run (in stacks)

By inspecting the rancher container I noticed it persists /var/lib/cattle as well, nothing special there though. I didn’t have a chance to do a test disaster recovery yet, but I’m planning to.

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [January 10, 2018, 10:09pm UTC](https://forums.suse.com/t/rancher-state-details/8188/2 "2018-01-10T22:09:39Z")

</div>

Yes, but unless you have a filesystem with point-in-time snapshots (e.g. ZFS) you should use something like `docker exec -it <server container id> mysqldump cattle > backup.sql`.

A straight `cp` or similar of a mysql data dir where the data is changing as it’s is being read for the copy is not crash-consistent and may not even load if you try to use it.
