2.7. Restoring the Target Device to its Original State

If you use the devtool deploy-target command to write a recipe's build output to the target, and you are working on an existing component of the system, then you might find yourself in a situation where you need to restore the original files that existed prior to running the devtool deploy-target command. Because the devtool deploy-target command backs up any files it overwrites, you can use the devtool undeploy-target to restore those files and remove any other files the recipe deployed. Consider the following example:

     $ devtool undeploy-target lighttpd root@192.168.7.2
            

If you have deployed multiple applications, you can remove them all at once thus restoring the target device back to its original state:

     $ devtool undeploy-target -a root@192.168.7.2
            

Information about files deployed to the target as well as any backed up files are stored on the target itself. This storage of course requires some additional space on the target machine.

Note

The devtool deploy-target and devtool undeploy-target command do not currently interact with any package management system on the target device (e.g. RPM or OPKG). Consequently, you should not intermingle operations devtool deploy-target and the package manager operations on the target device. Doing so could result in a conflicting set of files.