DOKK / manpages / debian 12 / fai-server / fai-mirror.1.en
fai-mirror(1) General Commands Manual fai-mirror(1)

fai-mirror - create and manage a partial mirror for FAI

fai-mirror [OPTION]... DIRECTORY

This command creates a partial mirror of Debian packages. It can be used to create the fai CD or as a local mirror when you can't download the whole Debian mirror. By default the mirror will contain all packages of all classes used in the configuration space (/srv/fai/config/package_config).

Download packages from architecture ARCH. If not specified, use native architecture of host.
Do not add packages included in base.tar.xz and packages defined in /etc/fai/NFSROOT to the mirror. By default all these packages are included in the mirror. This will explicitly remove packages from the mirror that are already in base.tar.xz.
Create the mirror only from packages names in /srv/fai/config. Do not include packages from /etc/fai/NFSROOT, but also do not remove packages that are in base.tar.xz. This is useful if your partial mirror does not match the Linux distribution of the nfsroot, or if you do not have a nfsroot yet.
Use CFDIR as the configuration directory. Default is /etc/fai. You can also set the environment variable FAI_ETC_DIR.
Use only this list of classes for building the mirror. Can't be used in conjunction with -x.
Show simple help and version.
Set the number of packages to NUM. This overwrites the variable MAXPACKAGES.
Exclude these classes. Do not add the packages of these classes to the mirror.
Override the value of FAI_CONFIGDIR set in nfsroot.conf.
Copy an APT preferences file into the cache config before creating the mirror. Using this you can set pin priority for packages to a certain release.
Preserve existing sources.list. NOT YET IMPLEMENTED.
Read variable definitions from class/*.var if used in package_config/<classes>.
Create verbose output.


# fai-mirror -v /files/scratch/mirror

Creates a partial mirror in the directory /files/scratch/mirror using all classes.


# fai-mirror -v -cDEFAULT,DEMO /debmirror

Creates a partial mirror containing all packages used in the classes DEFAULT and DEMO.


# fai-mirror -v -cDEFAULT,AMD64 /srv/debmirror-amd64

Will create a mirror including packages for amd64 architecture defined for classes DEFAULT and AMD64. You can also run this on a non amd64 host.

You only need root permissions if you access the official Debian mirror via NFS. By default, the variable MAXPACKAGES is set to 1, so conflicting packages can also be added to the mirror. Setting this to a higher number (e.g. 99999) reduces the time for creating the mirror, but some packages may be missing.

This program is part of FAI (Fully Automatic Installation). The FAI homepage is https://fai-project.org.

fai-make-nfsroot(8), install_packages(8)

/etc/fai/fai.conf
The FAI configuration file.

/etc/fai/nfsroot.conf
The FAI configuration file for the nfsroot.
/etc/fai/apt/sources.list
Package resource definition for FAI.
/srv/fai/config/package_config/
The FAI package configuration directory. This directory is defined by the variable FAI_CONFIGDIR.
$NFSROOT/var/tmp/base-pkgs.lis
The list of packages included in base.tar.xz inside the nfsroot.
$NFSROOT/var/tmp/packages.nfsroot
Additional packages that were added to the nfsroot by the configuration file /etc/fai/NFSROOT.

Thomas Lange <lange@cs.uni-koeln.de>

November 2015 FAI 5.0