Local rsync mirror

rsync is a method of synchronizing one machine against another to ensure the files are consistent and updated when necessary. This is not the same as a cp function as files will be skipped if they are determined to be current. Local rsync'ing is much faster than synchronizing every machine against official Gentoo rsync mirrors, and it will reduce the load on those mirrors.

Installing
To preapre the server we need the rsync tool. It should be in the system by default, but if it is not then you will need to emerge it:

Configuring
The file used to configure Rsync is. It should have the settings required to setup your own local Rsync for the Portage tree. Find the lines in the example below and uncomment them:

Now you will need to start the server:

To have rsync start at boot:

Configuring client
The local rsync server should be working, but before you will start syncing you will need to edit on your client machines by adding or changing the SYNC variable:

Change 192.168.1.2 to the proper IP address of your server. Additionally, you can only specify one mirror to synchronize against.

Opening rsync port on firewalled systems (iptables)
rsync handles communications through TCP port 873. If you are firewalled you will need to open the port by adding following line to your firewall script:

Not so obviously, change eth0 to the proper device that connects to your network.