Managing Embedded Linux |
Backing Up the User File System
1.Create a backup file. The specific commands used to back up the user file system depend on whether the firmware version is earlier or later than version V1.5.
Firmware versions earlier than V1.5 (not including V1.5)
#upramdisk
#backupfs /mnt/ramdisk/usrdisk
Firmware version V1.5 (and later versions)
First type the following command to enable the RAM disk:
#upramdisk
Next, use the file system backup utility provided by Moxa:
Alternatively, you may type the following command to back up the file system to the CF card:
2.Once the file system is backed up, use FTP to transfer the file
192.168.3.127 – PuTTY
root@Moxa:~# upramdisk |
|
|
|
| ||
root@Moxa:~# cd /mnt/ramdisk |
|
|
| |||
root@Moxa:/mnt/ramdisk# df |
|
|
| |||
Filesystem | Size | Used Available Use% Mounted on | ||||
/dev/mtdblock3 | 26.0M | 9.0M | 17.0M | 35% | / | |
/dev/mtdblock3 | 26.0M | 9.0M | 17.0M | 35% | / |
/dev/ram2 | 2.0M | 42.0k | 1.8M | 2% /var |
tmpfs | 62.1M | 0 62.1M | 0% | /dev/shm |
/dev/ram1 | 29.0M | 13.0k 27.5M | 0% /mnt/ramdisk |
root@Moxa:/mnt/ramdisk#
Now backup the user root file system. Please wait. . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Backup user root file system OK. root@Moxa:/mnt/ramdisk#
Deploying the User File System to Additional
For some applications, you may need to ghost one
Firmware versions earlier than V1.5 (not including V1.5)
Type the following commands to force the system to jump to the Mini File System:
#mv /etc/inittab /etc/inittab.bak #reboot
#upramdisk
Use ftp to download the backup file of the user file system from the PC to the /mnt/ramdisk directory:
#bf /mnt/ramdisk/usrdisk #reboot
Firmware version V1.5 (and later versions)