Differences between revisions 2 and 3
Revision 2 as of 2004-12-24 03:04:52
Size: 3067
Editor: anonymous
Comment:
Revision 3 as of 2007-08-08 20:00:23
Size: 0
Editor: FranklinPiat
Comment: merly a mix of a "apt-move.conf" manpage and sample file.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## Auto-converted by kwiki2moinmoin v2005-10-07
["Apt"] > apt-move
----
apt-move - move cache of Debian packages into a mirror hierarchy.
SYNOPSIS

apt-move [-c conffile] [-ft] command
DESCRIPTION

{{{apt-move}}} is use to move files from an AptGet cache (which is stored by default in {{{/var/cache/apt}}}) into partial mirror of the Debian archive. It will place the packages in the mirror directory specified in the configuration file {{{/etc/apt-move.conf}}}, and optionally delete any obsolete files in the mirror.

I won't repeat the man page here (say {{{man apt-move}}} on any system with apt-move installed), but below is a sample configuration file.
{{{
    # Configuration file for the apt-move script.
    #
    # You should modify the following configuration to suit your system.
    # See the apt-move(8) manpage for information about these settings.
    #
    # The defaults for this file are simply the settings I currently use.
    
    # Configuration for apt-move script --------------------------------------
    
    # The sites in ``/etc/apt/sources.list'' that you wish to mirror.
    APTSITES="''all''"
    
    # The absolute path to your debian directory (top of your local mirror).
    # This MUST appear as the first entry of your sources.list if you use
    # sync or mirror.
    LOCALDIR=/mirrors/debian
    
    # The default distribution (see the apt-move(8) manpage for details)
    DIST=sarge
    
    # The package types you want to mirror.
    # Possible values are: binary, source, and both (use only one).
    PKGTYPE=binary
    
    # The full (absolute) path to your local cache of package files. The default
    # will work for the apt-get packages, unless you've reconfigured apt.
    FILECACHE=/var/cache/apt/archives
    
    # The full (absolute) path to your local cache of Packages files. The
    # default will work for the apt-get Packages, unless you've reconfigured apt.
    LISTSTATE=/var/lib/apt/lists
    
    # Do you want apt-move to delete obsolete files from your mirror? (yes/no)
    DELETE=yes
    
    # Maximum percentage of files to delete during a normal run.
    MAXDELETE=20
    
    # Set this to yes if you wish to keep the originals for move/movefile.
    COPYONLY=no
    
    # Set this to 'none gzip' to get uncompressed Packages/Sources files.
    PKGCOMP='none gzip'
    
    # Set this to yes to make apt-move generate Contents files.
    CONTENTS=no
    
    # End Configuration
}}}

----

Note that this configuration is changed from the default in only one place: {{{DELETE}}} has been set to {{{yes}}}. If you want to change the location of the mirror (destination directory), change {{{LOCALDIR}}} to the desired location.

Probably the quickest and most often used command in {{{apt-move}}} is{{{
    apt-move update
}}}
This will update the master files (which indicate what packages are available and where packages should be stored), moves the packages into the local tree (mirror), deletes obsolete packages in the tree, and rebuilds new local Packages.gz and Sources.gz.