- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- how to save daily from cron job the whole Web serv...
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
09-08-2003 01:25 PM
09-08-2003 01:25 PM
how to save daily from cron job the whole Web servers date from /srv/www
and send it via ftp to other linux server ?
I would be very glad, if someone could
post the script.
kind regards
chris
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2003 05:16 PM
09-08-2003 05:16 PM
Re: how to save daily from cron job the whole Web servers data ?
You'll still have to work, because I'm using openssh/Secure Shell(on the HP-UX) side. I won't use ftp scripts because of the clear text user authentication.
First you create a tar file.
cd /svr/www
tar cvf /tmp/webbackup.tar *
This will back up everything under the directory you cd'd to.
Alternate command line:
tar cvf /tmp/webback.tar /svr/www/*
Same basic idea.
You might want the p parameter for tar to preserve the full path of the files.
Now you have a backup.
For maximum transmission efficiency, gzip the file.
gzip /tmp/webback.tar
The filename is now: /tmp/webback.tar.gz
Assuming you have openssh/Secure Shell and exchange public keys, you can transmit the file to another server.
scp -p /tmp/webback.tar.gz root@linux://tmp
That will go automatically.
Now the cron job on the target server:
gunzip /tmp/webback.tar.gz
That's what you asked for.
I can't provide a script because my firewall won't let me access it(a good thing). When I get home in two hours, I'll post up the script, which has full path names and actually runs in cron.
good luck,
regards,
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
09-08-2003 05:53 PM
09-08-2003 05:53 PM
Re: how to save daily from cron job the whole Web servers data ?
SEP has given the outline. it details what needs to be done. so i would suggest you to work a script on your own and post back if ur having problems. this helps u understand the scripts and also will also help u when u have problems with this script.
dont expect to be spoon fed.
-balaji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2003 07:39 PM
09-08-2003 07:39 PM
SolutionAttaching copyprod script.
This is run on the target server by cron. It copies over the backup file from the production server and puts the web data some sendmail config backup and DNS into the backup server.
Note: All three of my servers are Master servers, capable of running the Enterprise. This is to protect from hardware failures.
See attachment:
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
09-08-2003 07:43 PM
09-08-2003 07:43 PM
Re: how to save daily from cron job the whole Web servers data ?
As noted, my setup has the second server pulling the backup, not the production server pushing it. Its cleaner that way, less chance of errors. If the network connection isn't there, the copyprod script terminates without any harm being done.
See attachment
Production environment is Red Hat 7.3 apache 1.3.x BIND 9.2.x sendmail 8.11, all fully patches.
SEP
makebackup
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
09-11-2003 07:56 AM
09-11-2003 07:56 AM
Re: how to save daily from cron job the whole Web servers data ?
thanks very, very much.
but how is the entry for the cron job
to run this script ?
and I did not see the entry for
the ftp command
best regards
chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2003 08:32 AM
09-11-2003 08:32 AM
Re: how to save daily from cron job the whole Web servers data ?
apologies for the delay.
makebackup on the production server:
5 0 * * * /usr/contrib/bin/makebackup 2>&1
This runs it once a day at 5 minutes past midnight.
I now run it hourly at five minutes past the hour. To do that change the zero to *
on the backup server, here is the cron entry for the copyrpod script.
5 1 * * * /usr/contrib/bin/copyprod 2>&1
That runs it at 1:05 a.m. which gives the midnight backup an hour to finish.
You'll need to have public keys exchanged on openssh to make this work. Attaching a document.
If I was a jerk in the other thread, I'm sorry. The date has really gotten to me. The more I try to ignore it, the nastier and more obnoxious I become. That just covers for the sadness.
Hope this helps.
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
01-14-2004 02:41 AM
01-14-2004 02:41 AM