Quote:
Originally Posted by
filosophizer
is it possible to make a Tar of completely directory and placing the tar file in it (will this cause even the tar file to tarred ?)
Yes, that is possible - it is just not worth the hassle.
Quote:
Originally Posted by
filosophizer
will the tar file backup.tgz also include backup.tgz ?
Without taking precautions: yes, it will, although in an incomplete and unusable form.
Note that this here is the AIX-forum and hence i suppose you use AIX as your OS. The AIX tar (as opposed to the GNU tar) does NOT know the suggested "--exclude" option , because it is not required by POSIX. This means the suggested solution will not not work in AIX as long as you are not willing to install a lot of (GNU-)software.
You can achieve the same using some
find-statement to produce a list of file names in the directory minus the one with the name of the tar-file itself and feed that into tar. But, frankly: wouldn't be writing the tar-file elsewhere and finally moving it be a lot easier? In principle it is possible to walk from Europe to China on your hands, but: an airplane will get you there as well and it will be less tedious.
If you think about backing up your database that way, be warned: tar follows the
ustar-standard and this limits the single input file to 8G of size. Therefore tar is a poor tool for database backups. (btw: cpio does the same). For the backup of Oracle databases consider using the Oracle-framework called RMAN and some backup tool. You need it anyway because you need to constantly shovel the archive logs off the machine when the DB is running.
I hope this helps.
bakunin