02-24-2013
Quote:
Originally Posted by
MichaelFelt
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.
This is true. From the
AIX 6.1 manual:
Quote:
tar does not preserve the sparse nature of any file that is sparsely allocated. Any file that was originally sparse before the restoration will have all space allocated within the filesystem for the size of the file.
IMHO "tar" is a good device to bundle some files up to an archive. If one wants to bundle the source files for a software project or to create a snapshot of ones HOME-directory it is a tool worth considering. "tar" plays in the same league as "cpio", "pax" and probably some other tools, "backup" among them.
As Michael hinted at "tar" is platform-independent to a quite unparalleled degree. This is as much an advantage as it is a limiting factor because of some limitations. And for system-wide backups i would use "mksysb" and "savevg" solely under AIX - neither "tar" nor any of the other aforementioned programs.
Just my 2 cents.
bakunin
This User Gave Thanks to bakunin For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to set up a stanard sh script that will find all the files that have been changed within the last day and then tar them up.
I think the command line should be something like :
find /home/bob -atime +0 -exec \ tar cvf /home/bob/files.tar {}\;
Help please ...
Thanx (3 Replies)
Discussion started by: ianf
3 Replies
2. UNIX for Dummies Questions & Answers
# grep "Jul 3" syslog.messages | more
Jul 3 00:16:03 www3 CPU3: NOTICE: HTFS: No space on dev hd (1/42)
Jul 3 00:16:08 www3 CPU3: NOTICE: HTFS: No space on dev hd (1/42)
Jul 3 00:17:01 www3 CPU2: NOTICE: HTFS: No space on dev hd (1/42)
Jul 3 00:17:06 www3 syslogd: /usr/adm/debug: No space... (1 Reply)
Discussion started by: Cameron
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am creating a disaster recovery plan for my Linux 7.2 machine. I have two backups from my current machine.
One created using the command
tar -cvpf /dev/st0 --exclude=/proc --directory / .
and one created with the command
find / /boot /home -mount -path '/proc' -prune -o -print |... (4 Replies)
Discussion started by: jeremiebarber
4 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I've got dozens of tar's with two files in each one,
live_access_log & live_error_log (one tar for each day, backups).
The probelm is i need to match a pattern in all of the archive_access_log files and output the line to a seperate file (All_access.log).
I.e. I need to get details... (21 Replies)
Discussion started by: tom123
21 Replies
5. Solaris
Hi all,
I would like to know what would happen if the tape (media) is not placed on the drive and a tar command is executed to backup on the tape.
My problem is that tar command hanged for multiple days instead of throwing the error,
Is it valid behaviour?
I was unable to test the... (4 Replies)
Discussion started by: jmsathish
4 Replies
6. Shell Programming and Scripting
Hiiiii friends
I have 2 files which contains huge data & few lines of it are as shown below
File1: b.dat(which has 21 columns)
SSR 1976 8 12 13 10 44.00 39.0700 70.7800 7.0 0 0.00 0 2.78 0.00 0.00 0 0.00 2.78 0 NULL
ISC 1976 8 12 22 32 37.39 36.2942 70.7338... (6 Replies)
Discussion started by: reva
6 Replies
7. Solaris
Hi Gurus
I need to know few things related to HBA port & fcinfo command
I have a server where there are 4 HBA ports cards are their. Out of 4 ports 2 are in use & 2 are not in use when I check it physicall. Now I want to know the command through which I can get information about all above... (6 Replies)
Discussion started by: girish.batra
6 Replies
8. AIX
Steps to upgrade AIX TL ( technology Level ) / Maintenance Level in AIX ( including Firmware HMC VIOS )
This article or post covers upgrades for
- Hardware Management Console ( HMC )
- Firmware ( also known as microcode )
- VIO ( Virtual I/O Server = PowerVM )
- AIX Version, Technology... (2 Replies)
Discussion started by: filosophizer
2 Replies
9. Shell Programming and Scripting
Need to
1. archive all the files in a directory from the previous month into a tar/gz file, ignoring all already archived 'tar.gz' files
2. Check created .tar.gz file isnt corrupted and has all the required files in it. and then remove the original files.
I am using a function to get the... (1 Reply)
Discussion started by: Prev
1 Replies
10. AIX
Hello,
Getting this very strange error, made tar/zip through gnu tar
GNU Tar ( successful tar and zip without any errors )
/opt/freeware/bin/tar cvf - /oraapp| gzip > /backup/bkp_15_6_16_oraapp.tgz
GNU unTar error
root@test8:/>gunzip < /config1/bkp_15_6_16_oraapp.tgz |... (5 Replies)
Discussion started by: filosophizer
5 Replies
TAR(1) General Commands Manual TAR(1)
NAME
tar - archiver
SYNOPSIS
tar key [ file ... ]
DESCRIPTION
Tar saves and restores file trees. It is most often used to transport a tree of files from one system to another. The key is a string
that contains at most one function letter plus optional modifiers. Other arguments to the command are names of files or directories to be
dumped or restored. A directory name implies all the contained files and subdirectories (recursively).
The function is one of the following letters:
c Create a new archive with the given files as contents.
x Extract the named files from the archive. If a file is a directory, the directory is extracted recursively. Modes are restored if
possible. If no file argument is given, extract the entire archive. If the archive contains multiple entries for a file, the lat-
est one wins.
t List all occurrences of each file in the archive, or of all files if there are no file arguments.
r The named files are appended to the archive.
The modifiers are:
v (verbose) Print the name of each file treated preceded by the function letter. With t, give more details about the archive entries.
f Use the next argument as the name of the archive instead of the default standard input (for keys x and t) or standard output (for
keys c and r).
u Use the next (numeric) argument as the user id for files in the output archive. This is only useful when moving files to a non-Plan
9 system.
g Use the next (numeric) argument as the group id for files in the output archive.
EXAMPLES
Tar can be used to copy hierarchies thus:
{cd fromdir; tar c .} | {cd todir; tar x}
SOURCE
/sys/src/cmd/tar.c
SEE ALSO
ar(1), bundle(1), tapefs(1)
BUGS
There is no way to ask for any but the last occurrence of a file.
File path names are limited to 100 characters.
The tar format allows specification of links and symbolic links, concepts foreign to Plan 9: they are ignored.
TAR(1)