terrywong
asked on
tar command
Hi All,
Our system is AIX 5.1.
1. I wrote a srcipt to tar FOUR directories:
tar -cvf /dev/rmt0.1 / >> /logs/coldbackup
tar -cvf /dev/rmt0.1 /usr >> /logs/coldbackup
tar -cvf /dev/rmt0.1 /var>> /logs/coldbackup
tar -cvf /dev/rmt0.1 /opt >> /logs/coldbackup
However at the end I found it tar ALL the directories in my system, such as /tmp, /abc, /def, ....etc. So what's the problem? I shouldn't put tar / (root) in the script? if there is alternative method to backup / ?
2. I saw there is some limitation on using tar to backup the file size which is bigger than 2 G, so how to solve?
Thanks
Our system is AIX 5.1.
1. I wrote a srcipt to tar FOUR directories:
tar -cvf /dev/rmt0.1 / >> /logs/coldbackup
tar -cvf /dev/rmt0.1 /usr >> /logs/coldbackup
tar -cvf /dev/rmt0.1 /var>> /logs/coldbackup
tar -cvf /dev/rmt0.1 /opt >> /logs/coldbackup
However at the end I found it tar ALL the directories in my system, such as /tmp, /abc, /def, ....etc. So what's the problem? I shouldn't put tar / (root) in the script? if there is alternative method to backup / ?
2. I saw there is some limitation on using tar to backup the file size which is bigger than 2 G, so how to solve?
Thanks
terrywong,
I strongly suggest to use gtar. Check http://www.gnu.org on how to get it for AIX.
Stefan
I strongly suggest to use gtar. Check http://www.gnu.org on how to get it for AIX.
Stefan
You are better off using the AIX backup command instead of tar for system backups.
BTW, why are you asking an AIX question in the Solaris area? Did you know there is a new "AIX ISMs UNIX OS" area?
BTW, why are you asking an AIX question in the Solaris area? Did you know there is a new "AIX ISMs UNIX OS" area?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> I shouldn't put tar / (root) in the script? if there is alternative
> method to backup / ?
Depends. Some tars, such as Gnu tar, allow you to specify not to cross a file system's boundary.
In terms of performance, it's probably better to back up all file systems in parallel, but you'd need several tape drives for that.
> I saw there is some limitation on using tar to backup the file size which is bigger than 2 G, so how to solve?
Again, depends :-)
There are tar versions which support 64bit file sizes. You can simply check yours by creating a dummy file, like
dd if=/dev/zero bs=1024k count=2500 > some_place_which_supports_
...and tar it.
(maybe dd also doesn't like 2G files - check your documentation)
Cheers,
Stefan