- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tar backup
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2006 12:15 AM
12-01-2006 12:15 AM
tar backup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2006 12:20 AM
12-01-2006 12:20 AM
Re: tar backup
did you try something like:
cd /
tar -cvf /tmp/FILES.TAR ./*.*
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2006 12:25 AM
12-01-2006 12:25 AM
Re: tar backup
What Yogeerai provided it the way to do it. And its a relative backup and restore vs. an absolute. What's the difference? The pathway of the archive that your creating.
./* = relative
/dir/dir/* = absolute
If you absolute restored and the mount point didn't exist then you'd be making a sub directory under / (root) and quickly max out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2006 12:51 AM
12-01-2006 12:51 AM
Re: tar backup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2006 01:40 AM
12-01-2006 01:40 AM
Re: tar backup
GNU 'tar' has far better options available than the standard 'tar'.
In particular, you note that you don't want to cross mountpoints. That is, if you are copying files from '/', you don't want to descend into '/usr', '/tmp', etc.
To control this, begin with:
# find / -xdev -type f > /tmp/myfiles
# tar -cv -T /tmp/myfiles -f /archivefile_or_tape
Using the standard HP-UX 'tar' you can (sometimes) do:
# tar -cvf /archivefile_or_tape `cat /tmp/myfiles`
The problem, however, is that the shell will expand the 'cat /tmp/myfiles' into a list and can potentially yield an "argument too big" error.
If you are not dedicated to using 'tar', I would suggest 'fbackup'. Of course, this is HP-UX proprietary and limits you to archiving and extracting on HP servers.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2006 05:52 AM
12-01-2006 05:52 AM
Re: tar backup
Example:
TARFILE=`date |awk '{print ($1)}'`.tar
tar -cf /home/backups/$TARFILE `cat /root/backupfiles` >>$LOGFILE 2>&1
cat /root/backupfiles
/bin
/boot
/dev
/etc
/home/a2b1002
/home/a2b1003
/home/aquota.user
/home/ftp
/home/httpd
/home/info
/home/webmaster
/initrd
/lib
/misc
/mnt
/opt
/root
/sbin
/scripts
/tmp
/usr
/var
As you see, my tarball goes into /home/backups but that dir does NOT get backed up (else I would be backing up my backup).
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2006 08:06 AM
12-01-2006 08:06 AM
Re: tar backup
Copy a directory using TAR
tar cf - .|(cd /tmp/tar.test; tar xf -)
* Note you must be root. You must cd to the directory and then issue the command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2006 11:12 AM
12-01-2006 11:12 AM
Re: tar backup
pax(1) has a -X option to do this and can write cpio or tar archives.
So: pax -w -X -f foo.tar /
>The problem is that the shell will expand the 'cat /tmp/myfiles'
cpio takes its list from stdin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2006 11:25 AM
12-01-2006 11:25 AM
Re: tar backup
> Dennis: pax(1) has a -X option to do this and can write cpio or tar archives.
Thanks, Dennis, I guess I need to examine 'pax' in more detail. It's ideal for handling the restoration of 'tar' archives created with absolute paths to a relative directory but I frankly had not investigated its use in creating 'tar' archives in the first place.
I would note that AIX implements a GNU-like ability to use a file to specify the 'tar' archive. It's too bad HP doesn't choose to add this enhancement too.
Regards!
...JRF...