Newbie: What is "rsync"?
Coming from other distros such as Debian and Arch, I don't really understand the purpose of rsync. In other distros I select one (or a few [such as security updates]) mirror location and syncronize with the mirror location itself.
Why am I required to set a sync as well as a mirror server? What is the difference between the GENTOO-MIRRORS and SYNC? Why do other distros not offer an rsync option? make.conf: Code:
GENTOO-MIRRORS="http://my.localmirror.org" |
rsync is not in the slightest bit gentoo specific. You have rsync on EVERY distro out there. They just don't use it the way gentoo does.
rsync here is being used to mirror a location using the rsync transfer method instead of http or ftp. It's just another way to obtain local copies of files, but here it keeps them up to date more effectively as it will compare the two locations explicitly. |
Quote:
So if rsync acts as a mirror why am I required to supply an http/ftp mirror as well as an rsync mirror? |
As per the documentation - http://www.gentoo.org/doc/en/handboo...?part=1&chap=6 the mirror contains the source code (lots of data) the rsync contains the config scripts (less code)
You wouldn't want to rsync ALL the source packages, that'd suck! |
The rsync command has been included with every distro I've installed, including Debian, but just as a command that you could use or not use as fits your needs.
Its most common use, I think, is to back up stuff, usually to another computer or drive. That's how I use it, at least. |
The rsync command is used to make one directory contain exactly the same than another directory, with a minimum of data transfer required, which is especially useful if the "template" (or "source") directory is located on an externel server in the internet.
rsync copies files you don't have, deletes files the other server does no longer have, and also checks if files have changed (using hashes) and updates your files accordingly. It's a fast & convenient method of synchronizing the contents of two given directories. So rsync is used to create a local 1:1 copy of the recent list of available packages to your machine. The other "mirror" thing is not used together with rsync because you don't want to download all the tenthousands of software packages that are available for possible install. It only specifies a server address where you can download packages from, which is then used whenever you install [a] software package[s]. |
Mmm, it seems your concern is that Gentoo uses rsync instead of curl or wget... well, assume it, your neighbour probably has a different car, a different pet, and a different wife. It's the way life is :P
Being that said, let's clarify some things. In first place, as said above, rsync has nothing to do with Gentoo. Gentoo uses rsync just like it uses gcc or glibc. Each distro picks whatever suits. Secondly, there are two separate kinds of data at package manager level: the ebuilds which conform the portage tree on one side; and the source (and a few binary) packages on the other side. Gentoo uses rsync for portage, which is kind-of the package database. But it also uses a plethora of other tools to fetch the actual packages. Most tarballs are downloaded using wget, but some ebuilds use other tools, even RCSs like svn, git, bazaar, cvs... It just depends on the nature of the package. Note that in any case, wget can be changed for whatever suits you by setting $FETCHCOMMAND in make.conf. I don't recommend it, though. Thirdly, you *don't need* to set neither the mirrors nor the rsync server. There are defaults. Maybe the handbook misguided you in that, I don't know. It's been years since I used it. rsync just happens to be the most efficient way to keep in sync the portage tree using the minimum bandwidth and cutting drastically the sync times. An RCS like git could be used as well, but it would introduce lots of control files in the tree which is, in my opinion, an unnecessary overhead (and in any case would not bring any advantage over rsync). If you feel that picky about using rsync for some obscure and mysterious reason, then just use whatever tool you prefer to reguarly download a portage snapshot, remove your old portage tree and uncompress the new one in the same location. Other than that, is there any real problem that you are trying to solve? |
Thank you for all your posts. I am still confused about the GENTOO_MIRROR variable.
Quote:
Is SYNC for synchronizing the portage database and GENTOO_MIRROR for downloading the actual packages. Is this a rough equivalent? SYNC ~= aptitude update (SYNC would be where the package manager goes to update the package database) GENTOO_MIRROR ~= aptitude get <software> (GENTOO_MIRROR would be where the package manager goes to get the actual package) |
Yes. You can actually just paste the url into a browser and take a look to see what it contains ;)
|
Quote:
|
All times are GMT -5. The time now is 11:33 PM. |