Restoring Backup Files
[posted 2004/08/25]
[Notes issued with the release of PIKT 1.17.0pre3, which introduced the new 'piktc -B' option for restoring backup files.]
pikt-1.16.0 introduced the 'piktc -b' option for doing backups when installing or deleting files. But what if you needed to undo the action, replace the new version with the backup? Until now, you had to do this by hand.
pikt-1.17.0pre3 introduces the 'piktc -B' option for restoring backup files.
So, for example, if you issue the command
# piktc -ibv +F inetd.conf +H ...
a new version of inetd.conf would be installed, with the previous version being retained as inetd.conf.piktbak (or whatever extension you specify in PIKT.conf).
If you need to restore the previous version, you would now use the command
# piktc -Bv +F inetd.conf +H ...
which replaces the most recent inetd.conf with its inetd.conf.piktbak backup (renamed as inetd.conf).
If you had mistakenly deleted inetd.conf while at the same time creating a backup with
# piktc -tbv +F inetd.conf +H ...
you could restore that file with the command
# piktc -Bv +F inetd.conf +H ...
Note that, although the -b option works with the -p option, install PIKT.conf, there is no way to use -B to restore the earlier PIKT.conf. As before, you would still have to do this manually.
As always, we welcome your suggestions and feedback.
For more examples, see Developer's Notes.