- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: tar Backs UP device Files !!!!!!
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
08-29-2001 08:12 AM
08-29-2001 08:12 AM
tar Backs UP device Files !!!!!!
tar backs up Device Files !
But loads of posts in ITRC says tar cannot back up device files..
# cd /dev/rdsk
# tar -cvf /home/sr151/devfil.TAR .
..
..
#
# cd /home/sr151
# tar -xvf devfil.TAR .
..
..
# ls c*
c100d...
c...
..
#
So now what is the difference between cpio and tar or am I not understanding something ..
Please clear me
Sure I wont fail to assign points
Sundar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 08:18 AM
08-29-2001 08:18 AM
Re: tar Backs UP device Files !!!!!!
cpio copies each file individually onto the tape without compressing it.
I use cpio on my servers.. i find it easier to restore individual files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 08:31 AM
08-29-2001 08:31 AM
Re: tar Backs UP device Files !!!!!!
I dunno who said tar cannot backup device files. I just tried it, works fine and restores fine also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 08:40 AM
08-29-2001 08:40 AM
Re: tar Backs UP device Files !!!!!!
Tar doesn't care what kind of file it is, the only limitations AFAIK , from the manpages of tar
Tar does not support archival of files larger than 2GB or files that have user/group IDs greater than 60K.
There is also a limitation to the number of characters in the filename or link name.
-HTH
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 10:29 AM
09-05-2001 10:29 AM
Re: tar Backs UP device Files !!!!!!
tar
The tar command only offers a limited number of options.
Effort is very high for restoring files and directories selectively.
The best way to restore a complete tar backup is to enter:
tar -xvf
If you do not want to see the listing of the files, simply leave out the v option.
To determine the contents of a tar archive, use the following syntax
(with tar, the device file can also be a normal file):
tar -tvf
Individual files can be restored by attaching their names to the command line prompt. For example:
tar -xvf /dev/rmt/0m /etc/hosts /etc/resolv.conf
Tar does not allow you to exclude files/directories from the backup, so you do not have the option of leaving out the LVM configuration files as you do with frecover.
Also when using the tar command, the system should be rebooted whenever a root disk has been restored.
If data affecting the system has been restored - this is all data which is not user data - a shutdown -r should always be performed immediately so that the system does not become inconsistent.
cpio
Cpio is one of the least commonly used backup/recovery tools. It is only intended for small file systems. Also it should be noted that it cannot save block files, character files and device files. Full backups are usually created using the find(1) command in combination with cpio.
Example:
find / -print | cpio -ov > /dev/rmt/0m absolute
ls | cpio -ov > /dev/rmt/0m relative
Cpio makes a version comparison of the file which is to be restored and only overwrites it if you use the -u option. It is important to know whether the backup was made relative or absolute to the paths. The restore is only possible accordingly.
Restore everything by overwriting the files available using -u, create directories not present using -d, display file names using -v and read files from the tape using -i:
cpio -iuvd <
Restore individual files:
cpio -iv
It is also possible here to use regular expressions and meta symbols for file names in order to mask directories or files.
If system level files are restored, it is important to reboot the system to ensure consistency. Do so with a shutdown -r command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 10:57 AM
09-05-2001 10:57 AM
Re: tar Backs UP device Files !!!!!!
Copying files from on dir to another:
tar
cd fromdir;tar -cf - . | (cd todir;tar -xf -)
cpio
cd fromdir;find . | cpio -pdmuxvl /newdir
...jcd...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 01:36 PM
09-05-2001 01:36 PM
Re: tar Backs UP device Files !!!!!!
Tar cann't backup files > 2gb. There is no large file support with tar.
...Madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 03:39 PM
09-05-2001 03:39 PM