- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: script to restore all the files and selected f...
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
Discussions
Discussions
Forums
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
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
тАО03-13-2011 08:04 AM
тАО03-13-2011 08:04 AM
script to restore all the files and selected files in tar format
- Tags:
- tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2011 08:11 AM
тАО03-13-2011 08:11 AM
Re: script to restore all the files and selected files in tar format
To restore from your tar archive, do something like:
# tar -xvf myarchive
...or for individual file(s):
# tar -xvf myarchive file1 file2 file3
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2011 09:18 AM
тАО03-13-2011 09:18 AM
Re: script to restore all the files and selected files in tar format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2011 09:23 AM
тАО03-13-2011 09:23 AM
Re: script to restore all the files and selected files in tar format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2011 12:45 PM
тАО03-13-2011 12:45 PM
Re: script to restore all the files and selected files in tar format
School assignment? Perhaps you should post
the actual requirements.
> i am attaching my backup script [...]
Interesting. I like the way it creates a
".tgz" file, but where does it do any gzip
compression? Doing an "rm", even if the
previous "tar" command failed, may be unwise.
> tar cf "/export/data/data_diff_$6-$2-$3.tgz" "$LIST"
What, exactly, do you think that this does?
Have you tried any of this stuff? (By the
way, should we non-psychics know what "$2",
"$3", and "$6" are in this case?)
> #creates backups of essential files
Probably not entirely true.
> i took the backup of all filesystem in
> hp-unix with backup script user tar command
> [...]
If you were depending on _this_ script for
your back-up operations, then you would seem
to be kidding yourself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2011 12:52 PM
тАО03-13-2011 12:52 PM
Re: script to restore all the files and selected files in tar format
You just do the reverse of your backup script:
# restore from weekly a full backup of all data and config. settings:
tar xf /export/data/data_full_$6-$2-$3.tgz
Note: you haven't gzipped that tar file.
tar xf /export/config/config_full_$6-$2-$3.tgz
# restore from incremental backup:
tar xf /export/data/data_diff_$6-$2-$3.tgz
tar xf /export/config/config_diff_$6-$2-$3.tgz
>abir: #tar -xvf /*
This "/*" isn't going to work unless the system has the exact files on the tape. AND you forgot the tarfile:
tar -xf foo.tar