Mirroring
YUM repository mirroring
These directions will walk you through using the open source tool reposync to mirror your YUM repository.
- Ensure you've installed this repository on your system. reposyncwill use the YUM configuration in /etc/yum.repos.d/ for mirroring.
- Install reposyncandcreaterepo:sudo yum install yum-utils createrepo NOTE:reposyncon CentOS 5 is buggy. We strongly encourage users to consider upgrading theirreposyncto a newer version.
- Create a directory for storing your repository data:
    mkdir -p /path/to/repository
- Run reposyncspecifying the the repository ID and the output directory.reposync --repoid=varnishcache_hitch -p /path/to/repository
- Finally, you should use createrepo to regenerate the repository metadata:
    createrepo -o /path/to/repository /path/to/repository
- Your YUM repository mirror is ready to use.
APT repository mirroring
These directions will walk you through using the open source tool apt-mirror to mirror your APT repository.
- Install apt-mirror:sudo apt-get install apt-mirror NOTE: If you are running Debian Wheezy or earlier, you must upgrade to a recent version (0.4.9 or newer) of apt-mirror for HTTPS support.
- Create a directory for your mirror:
    mkdir /path/to/repo-mirror 
- Determine which version of Ubuntu or Debian you'd like to mirror. You'll need to add this to your apt-mirror config in the next step.
- Modify the apt-mirror config, using your favorite editor:
      sudo nano /etc/apt/mirror.list The default/etc/apt/mirror.listconfiguration is split into two sections. The top section includes global configuration values. Set base_path to the directory you created above:set base_path /path/to/repo-mirror set nthreads 5 set _tilde 0The bottom section of/etc/apt/mirror.listcontains a list of repositories to mirror. Use the example below, taking care to replace ubuntu and trusty with your Linux distribution and version:deb https://packagecloud.io/varnishcache/hitch/ubuntu/ trusty main deb-src https://packagecloud.io/varnishcache/hitch/ubuntu/ trusty main 
- Import the GPG key for this repository by following the instructions on the GPG panel.
-  Run apt-mirror to generate the mirror.
      sudo apt-mirror 
- Your APT repository mirror is ready to use.
