Quote:
tar is recommended by
oracle for cold backup. it is widely used for this purpose ( backup )...
Nods.
TAR is a generic solution and this recommendation has wide applicability. That does not imply that it is a best practice for any platform.
Tar will often be a good choice for saving - I use it frequently - and opensource projects are usually distributed as a tar ball, but
TAR is not always so great for restoring. Not sure what the status is of
AIX tar atm, but it used to be if you restored a file using tar all the zero bytes that are not on disk actually get written to the "tape" AND these zero bytes get restored. (so called
sparse files getting backed up and restored as "full" files. There is a real danger that the
cold backup causes some
hot tempers when it does not fit where it is supposed to :wink
). In other words, a file/database that fit before the restore does not fit the same file system afterwards. This is what got me started >10 years ago to use backup and restore.
Granted, using
backup and
restore is less portable than
tar, but any platform dependent tool understands everything there is to understand about files living on their system. Think: Backup and Restore are the generic UNIX tools for system backups.
I do not know what Solaris, HPUX, "Linux" recommend for system backups. If it is tar they will have added features to make it able to backup files, directories and device definitions. However, even though it is a "tar" file, it is not really portable.
I diverge - getting back on track - I would recommend taking a look at the AIX
savevg script, or for something simpler my
"HOWTO: copy directories on AIX". It is not exactly what your are doing for your cold backups, but I hope it is easy to improve - to fit to your needs.
Any questions about either script - Post and I will do my best to answer them
here!
Or - make some improvements and post them back! I know there are many new features in backup and restore (working with encryption, e.g.). Much room for improvement.