Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting up a Sync Server
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jakeh
n00b
n00b


Joined: 25 Aug 2003
Posts: 37
Location: United States

PostPosted: Tue Sep 30, 2003 6:10 pm    Post subject: Setting up a Sync Server Reply with quote

Hello Gentoo Gents and Madams, :D

I currently have 10 gentoo servers (4 more since I last posted). I have written a simple cron script for each server to do an emerge sync, run fixpackages, and do an emerge -uDp world which is posted to a log file every night at 12:00am. Feel free to use it for yourself because it works great. Code:

Code:

CRONTAB ENTRY
0 0 * * * /usr/local/bin/DaySync.sh

SCRIPT ITSELF
#!/bin/bash
# DaySync.sh Script
# Update Portage Tree, Fix Packages, & Check for Latest Updates
# Author: jakeh
# Last Revision: 9/20/03

sync_log=/var/log/ESyncFxWUp.log
#------------------------------------------------------------------------------#
echo "Emerge Sync started: `date`" > $sync_log
/usr/bin/chmod 600 $sync_log
/usr/bin/emerge sync >> $sync_log
echo "Emerge Sync finished: `date`" >> $sync_log
echo "" >> $sync_log
#------------------------------------------------------------------------------#

#------------------------------------------------------------------------------#
echo "Fixpackages started: `date`" >> $sync_log
/usr/sbin/fixpackages >> $sync_log
echo "Fixpackages finished: `date`" >> $sync_log
echo "" >> $sync_log
#------------------------------------------------------------------------------#

#------------------------------------------------------------------------------#
echo "Checking Available Updates on the Web: `date`" >> $sync_log
/usr/bin/emerge -uDvp world >> $sync_log
echo "Nightly Emerge Sync Fix World Updates finished: `date`"
#------------------------------------------------------------------------------#

#------------------------------------------------------------------------------#
echo "Nightly Emerge Sync Fix World Updates finished." >> $sync_log
echo "***Note: This log file is overwritten every night at 12:00AM" >> $sync_log
#------------------------------------------------------------------------------#


The question I have for everyone now is how I would setup a server to do an emerge sync from the gentoo mirrors (Internet) using the script above, and have our other servers do an emerge sync off of our main server (Using the script above). Is there just a file (like /etc/make.conf) that I can edit to change where the other servers look for their updated portage tree?
Here's a basic topology:

[Sync Server Syncs off of Gentoo Mirrors]<--->Internet (Sync Mirrors)
^
|
V
[ Other Servers ]
[Sync off of Server Above...]

Thanks for any help.

Best regards,

Jake
_________________
Computers are like air conditioners, they stop working properly if you open Windows :)
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Tue Sep 30, 2003 6:26 pm    Post subject: Reply with quote

Hi!

You want to read this one :lol:

https://forums.gentoo.org/viewtopic.php?t=59134

HTH
T.
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
jakeh
n00b
n00b


Joined: 25 Aug 2003
Posts: 37
Location: United States

PostPosted: Tue Sep 30, 2003 6:50 pm    Post subject: Reply with quote

WOW THANKYOU!!! :D
_________________
Computers are like air conditioners, they stop working properly if you open Windows :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum