- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- File compression to a different dir dynamically
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-15-2003 11:13 PM
12-15-2003 11:13 PM
i.e
I start with
/mountpoint1/file1.dbf
I want to end up with
/mountpoint1/file1.dbf
and
/mountpoint2/file1.dbf.Z
It is for performing a disk backup, but I do not want to copy the file to mountpoint2 and then compress it. I would like the compression program to read /mountpoint1/file1.dbf as a source and create /mountpoint2/file1.dbf.Z as an archive in it's compressed size leaving /mountpoint1/file1.dbf intact.
Thanks in advance
Russ
We are running 10.20
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 11:19 PM
12-15-2003 11:19 PM
Re: File compression to a different dir dynamically
cd /newfile_system
compress /explicit_path/filename
this should put the compressed file into the directory you are located in when you run the command , I cant test this at moment but you could with some small file :-) John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 11:20 PM
12-15-2003 11:20 PM
Re: File compression to a different dir dynamically
Take a look at this thread, and the answer from Kenneth Platz.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=3212
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 11:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 11:23 PM
12-15-2003 11:23 PM
Re: File compression to a different dir dynamically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 11:24 PM
12-15-2003 11:24 PM
Re: File compression to a different dir dynamically
As you are talking about database files, be aware that the 'standard' gzip doesn't handle files > 2Gb though.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 11:24 PM
12-15-2003 11:24 PM
Re: File compression to a different dir dynamically
I confirm what Pete wrote ... You can even read from standard input to be sure that compress will not open your file directly :
cat /mountpoint1/file1.dbf | compress > /mountpoint2/file1.dbf.Z
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 11:26 PM
12-15-2003 11:26 PM
Re: File compression to a different dir dynamically
you can use -c option with compress command as well as gzip :-) John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 11:27 PM
12-15-2003 11:27 PM
Re: File compression to a different dir dynamically
gzip -9 -c /ABSOLUTE/filename > /ABSOLUTE/BACKUP/filename.gz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 11:35 PM
12-15-2003 11:35 PM
Re: File compression to a different dir dynamically
I guess it discounts gzip. We only have standard gzip
Cheers
Russ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 11:38 PM
12-15-2003 11:38 PM
Re: File compression to a different dir dynamically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2003 11:39 PM
12-15-2003 11:39 PM
Re: File compression to a different dir dynamically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2003 12:05 AM
12-16-2003 12:05 AM
Re: File compression to a different dir dynamically
mkdir /tmp/pipe p
dd if=/tmp/pipe of=/ABSOLUTE/BACKUP/filename.gz
gzip -9 -c /ABSOLUTE/filename > /tmp/pipe
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2003 12:07 AM
12-16-2003 12:07 AM
Re: File compression to a different dir dynamically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2003 12:18 AM
12-16-2003 12:18 AM
Re: File compression to a different dir dynamically
Thanks for the correction!
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2003 01:09 AM
12-16-2003 01:09 AM
Re: File compression to a different dir dynamically
If you cat the file and pipe it to gzip or compress, then redirect the standard output to the destination, you avoid large file problems.
cat dbfile.dbf | gzip > /backup_dir/dbfile.dbf.gz
[ I think they really meant mkfifo, which can be used in conjunction with gzip/compress and tar to copy compressed versions of big files from a remote system. If you want to be really flash, you can use a named pipe as an archive device file for your database. ]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2003 01:13 AM
12-16-2003 01:13 AM
Re: File compression to a different dir dynamically
Massimo's mkdir/mknod tempory mind block is creating a named pipe. "mknod" is the way to create such niceties :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2003 01:17 AM
12-16-2003 01:17 AM
Re: File compression to a different dir dynamically
# gzip < /dir/inputfile > /dir/outputfile.gz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2003 01:24 AM
12-16-2003 01:24 AM
Re: File compression to a different dir dynamically
/usr/bin/mkfifo appears to be a specific subset of /usr/sbin/mknod that anybody can run, not just the super-user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2003 01:27 AM
12-16-2003 01:27 AM