Operating System - HP-UX
1753979 Members
5470 Online
108811 Solutions
New Discussion юеВ

Compress and FTP from HP-UNIX to Windows

 
Raoof
Regular Advisor

Compress and FTP from HP-UNIX to Windows

Hello Experts,

Need urgent help please.

Environment Details:

HP-Unix 11.31
Windows XP/2003 server

I have the database dump files which will generate on running the cron job with export script at 1 AM and located in /backup directory.

I need the script to compress those dump files i.e. (date.dmp,date.log) immediately after generating it and then transfer to windows drive.

Valuable advices will be highly appreciated.

Thanks & Regards,
Syed



11 REPLIES 11
Steven Schweda
Honored Contributor

Re: Compress and FTP from HP-UNIX to Windows

> [...] transfer to windows drive.

Why?

Do you plan to _use_ the data on the Windows
system, or only store the data there?

If you need to uncompress (and use) the data
on the Windows system, then it may be helpful
to use Zip to do the compression. If the
Windows system will be used only as back-up
storage, then you could use any convenient
compression program on the HP-UX system.

> [...] FTP [...]

Why FTP? Scripting using FTP usually
involves storing user name and password
information in a (plain-text) file, which is
not very secure. SSH-based methods (scp,
sftp, ...) can be more secure.

> I need the script [...]

Write one? Old Forum threads should supply
any number of examples of scripts which
compress files and/or use FTP (or other
schemes) to send then to another system.
Raoof
Regular Advisor

Re: Compress and FTP from HP-UNIX to Windows

Why?

Do you plan to _use_ the data on the Windows
system, or only store the data there?

>>>
Windows system will be used only as back-up
storage for which i need to compress those dump files and put in this windows drive.


> [...] FTP [...]

Why FTP? Scripting using FTP usually
involves storing user name and password
information in a (plain-text) file, which is
not very secure. SSH-based methods (scp,
sftp, ...) can be more secure.


>>>
I wrote FTP but it doesn't mean that I stick to it? I just want to say that I need to transfer those compressed files either it may be in a gzip or zip format.


> I need the script [...]

>>> For which i need the commands or can say script to make it scheduled to run on specified time.

Hope you got the answers for your questions sir.

Please need valuable advices.

Regards
Steven Schweda
Honored Contributor

Re: Compress and FTP from HP-UNIX to Windows

> [...] make it scheduled to run on specified
> time.

man cron
man crontab


> Write one? Old Forum threads [...]

Still true.
Raoof
Regular Advisor

Re: Compress and FTP from HP-UNIX to Windows

What happen to you steven?? If you cannot give me the proper response then why are you wasting your time by giving replies in a rude way and that too not helpful.

Any other experts please do the needful as i am very new to hpunix.

Hope i get some proper response from other experts.

Regards
Steven Schweda
Honored Contributor

Re: Compress and FTP from HP-UNIX to Windows

> What happen to you steven?? [...]

I'm willing to help you, but I'm not willing
to do your whole job for you (for no money).

> [...] rude [...]

What was rude? Is it rude to expect you to
learn how to do your job by looking at "man"
pages and example scripts in old Forum
postings? If so, then I guess that you're
right, and I was wasting my time.
Raoof
Regular Advisor

Re: Compress and FTP from HP-UNIX to Windows

Any experts please.
Dennis Handly
Acclaimed Contributor

Re: Compress and FTP from HP-UNIX to Windows

You need to break your job down into steps/questions:

1) Do you know how to set up the crontab?

2) What type of logging do you need?

3) What do you do with the files in /backup after you send them to Windows?

4) How to you know you have sent the files and you can remove them? If you can generate them again, you don't have to worry too much when testing your scripting.

5) If the script is going to generate the dump file, gzip them and then ftp/scp them at the same time?

6) Any specific directory structure on the Windows system? Or just the date in the filenames?

7) When do you remove the files (lifetime) on Windows?
raoof_1
New Member

Re: Compress and FTP from HP-UNIX to Windows

Dear Dennis,

Thanks for your kind concern. Please find below the answers for your questions.

1) Do you know how to set up the crontab?

A) Yes i know and i already did one to run the script of daily db backup around 1am. After which the dump files are generating in the directory /backup.

2) What type of logging do you need?

A) Sorry i didn't get you on this question.

3) What do you do with the files in /backup after you send them to Windows?

A) Actually I am transferring those dump files from /backup directory from hpunix to the windows in which i have an external disk which is around 10T to be used for backup.

Once it gets transferred to windows drive files should be deleted as it is generating in the server itself.

4) How do you know you have sent the files and you can remove them? If you can generate them again, you don't have to worry too much when testing your scripting.

A) For this i need automated script which will transer and then delete the files from /backup location.


5) If the script is going to generate the dump file, gzip them and then ftp/scp them at the same time?

A) I need to gzip them and then transfer either with ftp or scp or ssh or any other transfer tools as the same time.


6) Any specific directory structure on the Windows system? Or just the date in the filenames?

A)Only the date in the filenames.

7) When do you remove the files (lifetime) on Windows?

A) It depends on the company requirement.


Hope you got to know more about my need with my given answers.

Please do the needful and help me to get rid out from this issue.

Thanks & Best Regards,
Syed
Dennis Handly
Acclaimed Contributor

Re: Compress and FTP from HP-UNIX to Windows

>2A) I didn't get you on this question.

What proof do you need that your program is working and copying files to your Windows box? Do you need to know the filenames and sizes?

>4A) For this I need automated script which will transfer and then delete the files from /backup location.

What type of data integrity checks do you need?
Do you have a way to get the info back and check the contents.

Basically it seems like you want to invent something like Data Protector.