Rancher 2.0 Single Node - different backup strategy


I am wondering if there is a different possibility to perform a backup of a single rancher 2.0 container as that described in the docs. Creating new (versioned) containers with volume from “live” container is somewhat cumbersome in my opinion. Is there a possibility to “just backup” a bind-mount volume from the container (e.g. etcd data), so I can handle this like “normal” file system based backups (instead of container-based)? Currently I am not sure, what are the prerequisites to backup /var/lib/rancher. I am thinking of rotating those backups and pushing them to some external storage, which is rather simple when just using backup files.

Thanks in advance.

1 Like

Take a look at this. Maybe it helps.

Thanks for the hint on using volumes. Using a bind-mount was just an example of being able to access the files that need to be backed up. Using volumes is perfectly suitable for this as well. Nevertheless, my question wasn’t aiming on how to make the necessary files accessible for backup, but rather which files those should be and what prerequisites must be met to perform a successful backup (e.g. rancher container must be stopped, …). So to sum it up, can I just backup /var/lib/rancher from the container and use that for restore? Does the container need to be stopped before backing up those files?

1 Like