March 14, 201511 yr Is it possible to back up my existing docker before updating it? As it runs on btrfs, can I just snapshot it somehow?
March 14, 201511 yr Docker on unRAID has 3 components 1. Config file. Small. 2. The container. Large but disposable since you can get iot form the online repo again (assuming you dont use EDGE) 3. The data files under appdata BTRFS snapshots dont cover all 3 of these. T
March 14, 201511 yr I've made a vary basic script to backup/restore containers a while ago, but only tested it twice, so be careful with it. #!/bin/bash D="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" if [[ -n $1 ]]; then backup_path=$1 else exit 1 fi if [[ -f ${backup_path}/restore.sh ]]; then echo Please choose an empty directory exit 0 fi running_containers=$(docker ps -q) if [[ -n $running_containers ]]; then docker stop ${running_containers} fi echo -e "#!/bin/bash\n" > ${backup_path}/restore.sh for container in $(docker ps -a -q); do image_name=$(docker inspect -f "{{.Config.Image}}" ${container}); image_id=$(docker inspect -f "{{.Image}}" ${container}) container_name=$(docker inspect -f "{{.Name}}" ${container} | grep -Po '/\K.*') container_cmd=$(${D}/docker_cmd.php ${container_name}) eval "docker save ${image_id} > ${backup_path}/${container_name}.tar"; echo "docker load < ${backup_path}/${container_name}.tar" >> ${backup_path}/restore.sh; echo "docker tag ${image_id} ${image_name}" >> ${backup_path}/restore.sh; echo "$container_cmd" >> ${backup_path}/restore.sh; done chmod +x ${backup_path}/restore.sh if [[ -n $running_containers ]]; then docker start ${running_containers} fi
March 14, 201511 yr Author Thanks for the replies and info. Since you responded, gfjardim, I am wanting to back up your btsync container before upgrading in case it upgrades to sync 2.0. Sync 2.0 is incompatible with the old 1.4 clients which all my other devices run. Which version does it update to?
March 14, 201511 yr Thanks for the replies and info. Since you responded, gfjardim, I am wanting to back up your btsync container before upgrading in case it upgrades to sync 2.0. Sync 2.0 is incompatible with the old 1.4 clients which all my other devices run. Which version does it update to? BTSync 2.0.82
March 14, 201511 yr Thanks for the replies and info. Since you responded, gfjardim, I am wanting to back up your btsync container before upgrading in case it upgrades to sync 2.0. Sync 2.0 is incompatible with the old 1.4 clients which all my other devices run. Which version does it update to? And this is exactly why Dockers should be versioned and labeled and never auto update. They should always be exact snapshots in time. One never knows if an update will break everything or not. It's even worse with using developer branches of the application in question.
March 14, 201511 yr Author Thanks for the replies and info. Since you responded, gfjardim, I am wanting to back up your btsync container before upgrading in case it upgrades to sync 2.0. Sync 2.0 is incompatible with the old 1.4 clients which all my other devices run. Which version does it update to? BTSync 2.0.82 Crap ok, thanks for the answer Save me the trouble of updating to find out it doesn't work with anything anymore.
March 28, 201511 yr Docker on unRAID has 3 components 1. Config file. Small. 2. The container. Large but disposable since you can get iot form the online repo again (assuming you dont use EDGE) 3. The data files under appdata BTRFS snapshots dont cover all 3 of these. T What is the location of the config file? I would like to make a backup of just appdata and my container configuration (The volume mappings, port mappings and other variables). I know where the appdata is, but where is the container configuration stored?
March 28, 201511 yr Docker on unRAID has 3 components 1. Config file. Small. 2. The container. Large but disposable since you can get iot form the online repo again (assuming you dont use EDGE) 3. The data files under appdata BTRFS snapshots dont cover all 3 of these. T What is the location of the config file? I would like to make a backup of just appdata and my container configuration (The volume mappings, port mappings and other variables). I know where the appdata is, but where is the container configuration stored? Not entirely sure what is meant by config file, since it is typically in a mapped volume, probably part of appdata for most dockers. Perhaps he meant the template settings. Those are in /boot/config/plugins/dockerMan/templates-user
March 29, 201511 yr Docker on unRAID has 3 components 1. Config file. Small. 2. The container. Large but disposable since you can get iot form the online repo again (assuming you dont use EDGE) 3. The data files under appdata BTRFS snapshots dont cover all 3 of these. T What is the location of the config file? I would like to make a backup of just appdata and my container configuration (The volume mappings, port mappings and other variables). I know where the appdata is, but where is the container configuration stored? Not entirely sure what is meant by config file, since it is typically in a mapped volume, probably part of appdata for most dockers. Perhaps he meant the template settings. Those are in /boot/config/plugins/dockerMan/templates-user Great, thank you. The contents of the templates-user directory was exactly what I was looking for!
Archived
This topic is now archived and is closed to further replies.