Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Mirroring tool that implements the client (mirror) side of PEP 381

Project description

This is a PyPI mirror client according to PEP 381.

https://builds.gocept.com/job/bandersnatch/badge/icon

Installation

Until a release is ready, here’s the way to go:

$ hg clone https://bitbucket.org/ctheune/bandersnatch
$ cd bandersnatch
$ virtualenv-2.7 .
$ bin/python bootstrap.py
$ bin/buildout

Use ‘bin/bsn-mirror’ to get started. It will create a default config file for you with reasonable defaults. Review it. Then run ‘bin/bsn-mirror’ to initialize the mirror and use cron to run it regularly to keep up to date.

Mirror vhost configuration

For nginx the config should look something like this:

server {
    listen 127.0.0.1:80;
    server_name mymirrorname;
    root <path-to-mirror>/web;
    autoindex on;
    charset utf-8;
}

Note the charset utf-8! Otherwise the index pages will be served with an incorrect encoding. They will be correct but Unicode characters might end up looking funny.

Maintenance instructions

bandersnatch does not keep much local state in addition to the mirrored data. In general you can just rerun it to make it fix errors and you can force it to check everything by deleting the state files.

If you notice your mirror being inconsistent or you just want to cross-check, then:

  • delete the ./state file and ./todo (if it should exist)
  • run bin/bsn-mirror again to get a full sync

Be aware, that this might take hours depending on PyPIs performance and your network latency and bandwidth.

Migrating from pep381client installations

  • remove old status files
  • create config file
  • update cronjobs

Contact

If you have questions or comments, please submit a bug report to http://bitbucket.org/ctheune/bandersnatch/issues/new.

Kudos

This client is based heavily off the original pep381client by Martin v. Loewis.

1.0 (unreleased)

  • Initial release. Massive rewrite of pep381client.

Project details


Release history Release notifications

History Node

2.2.1

History Node

2.2.0

History Node

2.1.3

History Node

2.0.0

History Node

1.11

History Node

1.10

History Node

1.9

History Node

1.8

History Node

1.7

History Node

1.6.1

History Node

1.6

History Node

1.5

History Node

1.4

History Node

1.3

History Node

1.2

History Node

1.1

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.2.dev0

History Node

1.0.1

History Node

1.0

History Node

1.0rc6

History Node

1.0rc2

History Node

1.0rc1

This version
History Node

1.0dev

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page