Is there a “polite” way to maintain a local mirror of Drupal.org projects?

Now that Drupal.org has switched to using Git , is there an easy way to maintain a modern mirror with a selected subset (or even all) of the kernel and the contribution of projects locally? Or would it be discouraged by what he imposed on drupal.org infrastructure?

I understand that I can clone individual projects, but I would like the mirror to automatically update updates. It would be nice if the projects were available in case of failure, plus it would facilitate the development of offline.

+4
source share
2 answers

To answer your technical question about mirroring projects, here is what I would do:

  • Get a list of all projects (since git.drupal.org does not have a list of projects)
  • Create a directory to store all mirrors (i.e. ~ / projects / drupal-mirror /)
  • For each project, run git clone git://git.drupal.org/project/<project>.git <project>
  • Configure cronjob to run git pull for each of these projects every week or so.

For your local development, you can clone the local mirror into another directory.

Regarding how polite this is, I believe that only the Drupal community can respond. However, I can say that the git protocol is efficient enough and will not lead to much overhead to support your mirrors. If you want to stagger your traction, you can run git pull for each project in a shaky way so that you don't hit them in turn every week.

+3
source

A quick and dirty python script does just that.

https://github.com/olragon/drupalmirror

+1
source

Source: https://habr.com/ru/post/1341913/


All Articles