How does the "Backup user program to file system" on PCD3 and PCD2.M5 work?
With firmware 1.16.27 it is possible to write the user program backup to the file system. This new backup does also include the media (register, flags, timer, counter) as well as the configuration of IP protocol configuration such as the FTP and HTTP server settings.
Since the first release of a PCD3 or PCD2.M5 it was possible to store the user program to flash by a "Copy user program to flash". The first version of this backup mechanism was copying the user program together with the hardware configuration (S-Bus address, IP address, memory allociation) to a "hidden" flash section (on-board or present on e.g. a PCD7.R500). This backup does not include e.g. the FTP server configuration, the DHCP configuration etc. The content of the registers, flags and counters were not included in the "linear" backup.
In order to improve the backup functionality a new backup strategy has been implemented in firmware 1.16.27 and more recent firmware releases. With this firmware the backup is written to a file and contains also the media contents and the configuration of the IP enhancements and FTP/HTTP server:
|Content||"old" linear backup|
linear backup to
hidden onboard flash
FW before 1.16.xx
FS backup to hidden
new file system backup
(to flash memory card or INTFLASH)
| User program and|
| RAM and ROM DBs|
(at the time of the
| || || || |
| S-Bus settings |
(Serial, IP address,
| Content of media|
| IP protocol settings |
(DHCP, FTP, HTTP
| Smart RIO files|
*) The configuration of the IP extensions as well as the program files are stored on the onboard flash and thus are remanent; this is why they are not included to the onboard backup file.
Location of the backup on the file system
The backup file is always written to folder "PCD_BACKUP" in the root of a flash module (e.g. "M2_FLASH:/PCD_BACKUP")
The name of the backup file starts with the device name from the PG5 project (first 8 characters), followed by the current date and has the extension "*.SBAK":
The file system backup to the onboard flash is done to a hidden file system.
How to create a backup to the file system?
PG5 2.0 SP2 provides an improved dialog for the definition of the destination device of the backup. With PG5 2.0.150 or PG5 1.4, the backup can be done as usual as soon as the folder "PCD_BACKUP" has been created manually on a flash module.
In case several flash modules are present on the PCD, the first device in the following order (from left to right on a PCD3.M5) will be used for the backup and restore:
- INTFLASH:/PCD_BACKUP (PCD3 Compact or WAC)
- Every time a new backup is created, the existing backup in this folder will be deleted by the PCD
- The backup on the file system has priority over an existing "old" image backup on the device.
- If there are several backup files in the same folder "PCD_BACKUP", there is no rule which the PCD will take!
--> don't copy several backup files to the same folder
- It is possible copying the backup files from one PCD file system to another e.g. using FTP access
- PG5 2.0 SP2 will be able to generate backup files directly
- The "old" linear backups (restore as well as the creation) are still supported also with firmware which support the new file system backup mechanism
- The IP extensions (DHCP, PPP, DNS, FTP- and Web Server configuration) are not included to backup to the onboard flash
- Because the new FS backup is written to a file system, the memory cards containiing the "backup partition" (PCD3/7.R500, PCD3/7.R551 and PCD3/7.R651) modules are no longer necessary; the backups can be written to any flash card with a file system.
Firmware dependency for the "file system backup"
|PCD System||Minimal firmware for file system backup|
Systems not listed in this table do not support the user program backup to a file system.
PCD3 / Mxxx
PG5 2.0 / Device Configurator
PCD2 / M5xxx
Last update: 01.06.2015 11:06
First release: 21.06.2011 17:04