# PDF Generation and Loss of Python Docker Containers During Disaster Recovery Procedures

**URL:** <https://www.wago.community/t/pdf-generation-and-loss-of-python-docker-containers-during-disaster-recovery-procedures/2697>\
**Category:** Python\
**Created:** [April 25, 2026, 1:51pm UTC](https://www.wago.community/t/pdf-generation-and-loss-of-python-docker-containers-during-disaster-recovery-procedures/2697 "2026-04-25T13:51:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![lorenzo](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lorenzo](https://www.wago.community/u/lorenzo)\
**Post date:** [April 25, 2026, 1:51pm UTC](https://www.wago.community/t/pdf-generation-and-loss-of-python-docker-containers-during-disaster-recovery-procedures/2697/1 "2026-04-25T13:51:42Z")

</div>

Hello everyone,

I need to convert a simple TXT file (maximum 20 lines) into a PDF on a WAGO PFC300.  
I implemented a solution using a Python script running inside a Docker container.  
The solution works correctly, but when I clone the controller and restore it on another PFC300, the Docker application is lost and the system no longer works.

This is a major issue for us, because we need a reliable way to create an exact copy of the controller.

Do you have any suggestions on how to generate a PDF on the PFC300, or how to preserve the Docker container during backup and restore?

Best regards

---

<div class="post-metadata">

**Author:** ![WagoIcard](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagoicard/32/1508_2.png) [@WagoIcard](https://www.wago.community/u/WagoIcard)\
**Post date:** [April 27, 2026, 12:42am UTC](https://www.wago.community/t/pdf-generation-and-loss-of-python-docker-containers-during-disaster-recovery-procedures/2697/2 "2026-04-27T00:42:58Z")

</div>

I think first you need to do a docker commit command to save your container as image and that will help you to deploy it easily:

> **[docker container commit](https://docs.docker.com/reference/cli/docker/container/commit/)**

Next, is how are you doing the backup / restore ?

---

<div class="post-metadata">

**Author:** ![lorenzo](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lorenzo](https://www.wago.community/u/lorenzo)\
**Post date:** [April 27, 2026, 5:32am UTC](https://www.wago.community/t/pdf-generation-and-loss-of-python-docker-containers-during-disaster-recovery-procedures/2697/3 "2026-04-27T05:32:21Z")

</div>

> [@WagoIcard](#):
>
> Next, is how are you doing the backup / restore ?

I don’t remember that I used a commit, but I can try it.  
The backup is done with WAGO upload.

Regards,

---

<div class="post-metadata">

**Author:** ![WagoDamRud](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagodamrud/32/258_2.png) [@WagoDamRud](https://www.wago.community/u/WagoDamRud)\
**Post date:** [April 27, 2026, 7:51am UTC](https://www.wago.community/t/pdf-generation-and-loss-of-python-docker-containers-during-disaster-recovery-procedures/2697/4 "2026-04-27T07:51:49Z")

</div>

you can put SD card inside and from Web-based Management \> “Configuration”\>“Administration”\>“Create Image”

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/1/13ca060a2a88621097187fde5e765c3b0042bd5e.png)

This way you can create full copy of the controller.  
You can also turn on autoboot function, so if you put SD card into another controller all will be copied to the controller on controller powerup.

To turn it on you need to connect via SSH to the controller and paste this line:

```auto
/etc/init.d/cpsd2intern makelink

```

---

<div class="post-metadata">

**Author:** ![lorenzo](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lorenzo](https://www.wago.community/u/lorenzo)\
**Post date:** [April 27, 2026, 8:58am UTC](https://www.wago.community/t/pdf-generation-and-loss-of-python-docker-containers-during-disaster-recovery-procedures/2697/5 "2026-04-27T08:58:25Z")

</div>

thanks .. I try  
If I understand correctly, if I need a full copy of the controller, I must use an SD card. It is not possible via the network. Is that correct?  
(This is the first time we are using a WAGO controller.)

---

<div class="post-metadata">

**Author:** ![lorenzo](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lorenzo](https://www.wago.community/u/lorenzo)\
**Post date:** [April 27, 2026, 9:03pm UTC](https://www.wago.community/t/pdf-generation-and-loss-of-python-docker-containers-during-disaster-recovery-procedures/2697/6 "2026-04-27T21:03:45Z")

</div>

Hello everyone,

I followed these steps:

1. Install the Docker container

2. Verify with `docker ps` → Docker is running

3. Create a bootable image on the SD card

4. Remove the Docker containers using `docker rm -f $(docker ps -aq)`

5. Verify with `docker ps -a` → no containers present

6. Restart the PSC300 → the image on the SD card is restored

7. Verify with `docker ps` → Docker container is running

8. Power off the PSC300 and replace the SD card with an empty one

9. Restart the PSC300

10. Verify Docker → no Docker containers are present

When I change or remove the SD card, the container is removed.

Probably my procedure is wrong, but I don’t understand where the issue is.

Do you have any ideas?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![WagoIcard](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagoicard/32/1508_2.png) [@WagoIcard](https://www.wago.community/u/WagoIcard)\
**Post date:** [April 28, 2026, 12:04am UTC](https://www.wago.community/t/pdf-generation-and-loss-of-python-docker-containers-during-disaster-recovery-procedures/2697/7 "2026-04-28T00:04:55Z")

</div>

hello you forgot the step to reinstall the system from the SD card (aka copy from the SD card to the internal flash)

---

<div class="post-metadata">

**Author:** ![lorenzo](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lorenzo](https://www.wago.community/u/lorenzo)\
**Post date:** [April 28, 2026, 12:04pm UTC](https://www.wago.community/t/pdf-generation-and-loss-of-python-docker-containers-during-disaster-recovery-procedures/2697/8 "2026-04-28T12:04:58Z")

</div>

Many thanks.  
I used the same procedure that I used to prepare the SD card, setting Boot device = Memory Card and Destination = Internal Flash.  
The system is now working correctly.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/a/add31e196494c7107ae1134336e7c6a1ab1062d3.png)

Question:  
Is it possible to achieve the same result via the network?  
I tried using WAGO Upload and the Backup and Restore function, but the Docker container is not restored.  
regards

---

<div class="post-metadata">

**Author:** ![WagoIcard](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagoicard/32/1508_2.png) [@WagoIcard](https://www.wago.community/u/WagoIcard)\
**Post date:** [May 7, 2026, 12:27am UTC](https://www.wago.community/t/pdf-generation-and-loss-of-python-docker-containers-during-disaster-recovery-procedures/2697/9 "2026-05-07T00:27:42Z")

</div>

Hello, Yes it should be possible but maybe not with the backup restore function.  
Backup / Restore will work for most of the system but it may fail because of the docker requiring files that aren’t restored yet.

---

<div class="post-metadata">

**Author:** ![lorenzo](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lorenzo](https://www.wago.community/u/lorenzo)\
**Post date:** [May 7, 2026, 5:51am UTC](https://www.wago.community/t/pdf-generation-and-loss-of-python-docker-containers-during-disaster-recovery-procedures/2697/10 "2026-05-07T05:51:16Z")

</div>

Thank you very much for your reply  
Regards
