- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Backup with TAR
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
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
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
07-28-2003 04:23 AM
07-28-2003 04:23 AM
I have this configuration
Filesystem Use% Mounted on
/dev/sda1 80% /
/dev/sdb1 84% /home
/dev/sda4 76% /opt
and want to do a full backup for this machine. So , if I do "tar cvf /dev/st0 /* " it will backup all files in this machine ?
Regards,
Mauro
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 04:25 AM
07-28-2003 04:25 AM
SolutionI would suggest cpio.
#!/sbin/sh
# set -x
today_=`date +'%y-%m-%d'`; export today_
#
LOG1=/usr/tmp/cpio_${today_}.1st; export LOG1
#
PATH=$PATH:/usr/local/bin
export PATH
exec > /usr/tmp/cpio_${today_}.log 2>&1
#
#
find / -depth -print | cpio -ocBv > /dev/rmt/0m 2>> ${LOG1} &
first_cpio=$!; export first_cpio
#
wait $first_cpio
if test $? -ne 0; then
echo "Full Offline Backup did not complete successfully!"
fi
echo "Time is: `/bin/date`"
echo "Time is: `/bin/date`"
echo "Time is: `/bin/date`" >> ${LOG1}
~
END OF SAMPLE.
Rgds
Alexander M. Ermes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 04:27 AM
07-28-2003 04:27 AM
Re: Backup with TAR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 04:29 AM
07-28-2003 04:29 AM
Re: Backup with TAR
tar cv *
tar defaults to the first tape device.
This will back up every file on the box that is on a mounted filesystem.
It will not in any way back up the LIF area or other important boot files. Its value is to back up data only up to 2 GB, 8 GB if you have the latest HP tar patch.
If you want a usable bootable tape that can restore a working system, make_tape_recovery
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 04:36 AM
07-28-2003 04:36 AM
Re: Backup with TAR
My full backup should have 20GB and I am getting problems while running it because some file system did not appears in my tape.
I have a lot of files with 200MB. Is it a problem when using TAR ?
Cheers,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 04:38 AM
07-28-2003 04:38 AM
Re: Backup with TAR
tar cvf
will backup the full system as / is the mount point for all file systems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 04:47 AM
07-28-2003 04:47 AM
Re: Backup with TAR
How can I restore with cpio ?
I will test it.
Cheers,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 04:48 AM
07-28-2003 04:48 AM
Re: Backup with TAR
tar can handle upto 8GB, since your data is more than that, i would recommend using make_tape_recovery (ignite backup)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 05:03 AM
07-28-2003 05:03 AM
Re: Backup with TAR
if the file is in cpio format, to extract
#cpio -icdv < file_name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 05:35 AM
07-28-2003 05:35 AM
Re: Backup with TAR
Can I restore only any files ? For example, /home/mauro/backup/file_1.txt.
With the command listed I think I am gong to restore all files on tape. Am I right ?
Cheers,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 06:17 AM
07-28-2003 06:17 AM
Re: Backup with TAR
tar xv /path/to/the/file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 06:25 AM
07-28-2003 06:25 AM
Re: Backup with TAR
with cpio utility, in order to
restore one file, try this :
#cpio -icdv /home/mauro/backup/file_1.txt < file_name
Hih
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 08:28 AM
07-28-2003 08:28 AM
Re: Backup with TAR
cpio works fine but when I try to list the files on tape using cpio -ivt < /dev/st0 it shows the files with some strange characters. The blank space is shown "\" or the letter ?? (portuguese) has problems, for example, the file "/home/mauro/Finan??as" appears "/home/mauro/Finan\347as". What should it be ? When I want to restore can I use :
cpio idv "/home/mauro/Finan??as" or I should use "/home/mauro/Finan\347as" ?
Thanks once more,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 12:45 PM
07-28-2003 12:45 PM
Re: Backup with TAR
I think that you should use tar,
when you made tar for / it arcive all the
files and not check for LVs that is mounted.
Caesar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 06:38 PM
07-28-2003 06:38 PM
Re: Backup with TAR
Note that the above device files for disks and tape do not look like HP-UX but the comments about standard tar still apply.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2003 02:24 AM
07-29-2003 02:24 AM
Re: Backup with TAR
I think you are in the wrong place
/dev/sda1 and /dev/st0 are Linux not HP-UX
Still most of the info here above can be usefull,
On my linux I use dump to do full backup, from single user mode to backup each valid mount points in /etc/fstab, (valid that is not cd,nfs,floppys... etc)
like:
-------------------------------
#!/bin/bash
#mt -f /dev/st0 rewind
#dump -0a -f /dev/nst0 /
#dump -0a -f /dev/nst0 /usr
#dump -0a -f /dev/nst0 /home
#mt -f /dev/st0 rewind
-----------------
to restore (single user) you could do
#cd /
#mt -f /dev/st0 rewind
#restore -x -f /dev/nst0
This is for none interarive full restore
to restore on file in multi user mode do
#cd /usr
#mt -f /dev/st0 rewind
#mt -f /dev/st0 fsf 1
#restore -i -f /dev/nst0
this will put you in interactive restore with prompt
restore >
from there you can interactively mark file you want to restore ...
in this enviroment ls help extract are valid command just do a ? or help to get started
needless to say out have to test this on a test system before you fell at ease with the whole scenario.
I have put in place an automatic shutdown single user/backup/continue boot that those all the backup from crontab on given time/day.
You can also use tar as describe above, but to get a full/valid backup I would boot single user mode then do
#mt -f /dev/st0 rewind
#tar -cvzf /dev/st0 /
to restore full
boot installation cd start install until ask about partition of disk (do this if this is a new disk "you then better have saved your partition info some where safe") from there escape to shell "
this will get you to a shell prompt
from there you can restore with something like
(This is to long to describe in details)
tar -xvzf /dev/st0 "here your mount point.. something like /mnt/old_root
to restore individual files just do
#tar -xvzf /dev/st0 /usr/whatever_it_is
But I should stress that all this is from memory please test it and check, also there is a lot more to valid backup/restore then meet the eyes "like you must consider keeping in a safe place a report of you system's bios,disk,partions,network setup ... a long list" to begin to feel you could perhaps if you are lucky survive a main disater.
Hope you find some of this usefull
Jean-Pierre
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2003 04:28 AM
07-30-2003 04:28 AM
Re: Backup with TAR
What I am doing wrong ?
My crontab file has:
0 3 * * * /home/test/backup.sh 2> /tmp/log.err || mail -s "Error backup.sh" my_email@domain.com < /tmp/log.err
And the file /home/test/backup.sh has:
find / -depth -print | cpio -ocBv > /dev/st0 2>> /tmp/log.err
I want to run this crontab and if an error occurs list it in /tmp/log.err then send this file to me by email, but it does not work and if no error occurs I want that while the files are copied to tape a list of the files on tape is created in /tmp/Log_files_on_tape.txt simultaneously. How can I redirect the output os the "find" command listed to this file (/tmp/Log_files_on_tape.txt) ?
Thanks once more,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2003 04:31 AM
07-30-2003 04:31 AM
Re: Backup with TAR
I forgot to say that probably the output of the find command is goint to /tmp/log.err !?
I really do not understand...
Thanks.
Cheers,
Mauro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2003 06:24 AM
07-30-2003 06:24 AM
Re: Backup with TAR
The question is how large are your filesystems.
There is no limit ot how much you can put on a tape with tar or cpio, as you may span tapes etc.
If your filesystems are larger than 8 GB, scrap the tar idea. Go spend some money on
Microlite's BackupEdge. You can download a trial copy. It creates a tar archive, does compression, you can use tons of buffer size to speed the backup along. It also is the best tool for saving one's hash when necessary.
CPIO is fine also, but cpio I have used for years, and still hate it passionately, however it is usefull, and dump is good, for somethings. When a cpio archive has problems, start praying for God is the only one to help you when certain problems happen.
You are much more likely to have some trouble believing this but I spliced an old 150 MB from an Archive tape drive that had snapped. I opened the cartidge tape spliced it and lost only about 40 K of EDI data that we could redownload. We continued this recovery with a product named CTAR that was from Microlite. BackupEdge is the evolution of the same product, from the same company with 15 years of refinement.
I like BackupEdge as it creates a tar readable object. It also does incrementals, Masters,diferentials, and is cheap in price but terrific in quality.!!!
Tim