cdn-sync

8 Version 1.0.0

`cdn-sync`

Incrementally synchronize an Red Hat Satellite's RPM repository with Red Hat's CDN RPM repository.

            cdn-sync
            options ...

            -l --list-channels

            -r --show-repos

            -c CHANNEL
            --channel=CHANNEL

            -m MOUNT_POINT
            --mount-point=MOUNT_POINT

            --consider-full

            -p --print-configuration

            -a REPO
            --add-repo=REPO

            -d REPO
            --delete-repo=REPO

            --email

            --traceback-mail=EMAIL_ADDESS(ES)

            --no-rpms

            --no-packages

            --no-errata

            --no-kickstarts

            --force-all-errata

            --force-kickstarts

            --http-proxy HTTP_PROXY_HOSTNAME:PORT

            --http-proxy-username HTTP_PROXY_USERNAME

            --http-proxy-password HTTP_PROXY_PASSWORD

            --batch-size=BATCH_SIZE

            -h --help

            --count-packages

            --clear-cache

            -v --verbose

            --cdn-certs

            --list-eol

## Description

The &CDNSYNC; (cdn-sync) synchronizes a &RHNSAT; with Red Hat's CDN servers.

This tool enables a &RHNSAT; to update its database metadata and RPM packages with that of Red Hat. This action can be performed via the internet (ie. directly). To use this tool a &RHNSAT; must be registered to RHSM and must not be registered to another &RHNSAT;. For live content synchronizing via Inter-Satelite-Sync (ISS), or from local content on disk, please, use satellite-sync.

- o channels: sync channel data

- o rpms: sync (fetch) rpms

- o packages: sync full package metadata for those rpms fetched successfully

- o errata: sync errata data

- o kickstarts: sync kickstart data

## Options

-h, --help

- Display the help screen with a list of options.

--count-packages

- Count number of packages in all repositories for every channel.

-l, --list-channels

- list all available channels for import/syncing and exit. Output in format:

  STATUS NAME NUMBER_PACKAGES

  STATUS: 'p' = previously imported/synced channel, '.' = channel not yet imported/synced.

  NUMBER_PACKAGES: '?' = No CDN source provided to count number of packages, '0' = no packages in channel OR packages are not counted yet (it's necessary to run cdn-sync with --count-packages), number of packages.

-r, --show-repos

- Show all repositories assigned to channels for debug purposes. Use together with --list-channels or --cdn-certs.

-c, --channel`CHANNEL`

- process data for this channel only.

-m, --mount-point`MOUNT_POINT`

- Source mount point for import from Content ISO.

--consider-full

- When this option is used, channels being synced from Content ISO mount point will be considered to be full channels. Any package in channel but not in the mounted ISO will be deleted. Without this option the Content ISO is interpreted as Incremental Content ISO. This option makes sense only together with --mount-point. Live sync is always considered as full sync.

-p, --print-configuration

- print the current configuration and exit.

-a, --add-repo`REPO`

- Attach specified CDN repository to custom channel. Single custom channel has to be specified using --channel parameter. This parameter can be specified multiple times to attach multiple repositories. After repositories are attached, sync of channel is processed. On next run, channel can be synced directly using --channel parameter. Only CDN repositories not attached to channels provided by cdn-sync mappings can be attached to custom channels.

-d, --delete-repo`REPO`

- Delete specified CDN repository from custom channel. Single custom channel has to be specified using --channel parameter. This parameter can be specified multiple times to delete multiple repositories. After repositories are deleted, sync of channel is processed. On next run, channel can be synced directly using --channel parameter.

--email

- e-mail a report of what was synced/imported (sent to whomever is considered the receiver of "traceback_mail").

--traceback-mail=`EMAIL_ADDRESS(ES)`

- alternative email address(es) for all sync correspondence. Example: --traceback-mail="user1@example.com, user2@example.com".

--no-rpms

- do not keep downloaded RPMs on disk after DB import (debug only).

--no-packages

- do not process full package metadata.

--no-errata

- do not process errata data.

--no-kickstarts

- do not process kickstart data (provisioning feature).

--force-all-errata

- process metadata of all errata, not only missing.

--force-kickstarts

- download and overwrite existing kickstart data.

--http-proxy`HTTP_PROXY_HOSTNAME:PORT`

- alternative http proxy address and port (hostname:port)

--http-proxy-username`HTTP_PROXY_USERNAME`

- alternative http proxy username

--http-proxy-password`HTTP_PROXY_PASSWORD`

- alternative http proxy password

--batch-size=`BATCH_SIZE`

- maximum batch size for package import

  This option should not be used except for debugging purposes. The most useful case being --batch-size=1 where the database import process each piece of meta-data one at a time, isolating any issues.

  WARNING: --batch-size=1 will dramatically slow down the sync process.

-v, --verbose

- Verbose output. Possible to accumulate: -vvv.

--clear-cache

- Delete partially synced channels.

--cdn-certs

- Print details about currently used SSL certificates for accessing CDN.

--list-eol

- List end-of-life info about (some) channels available to sync.

## Configuration files

/etc/rhn/rhn.conf

- server.satellite.reposync_download_threads = 5

- Set maximum number of threads to be used for simultaneous downloads.

## Examples

- `cdn-sync --count-packages`
- `cdn-sync --list-channels`
- `cdn-sync --list-channels --show-repos`
- `cdn-sync --channel rhel-i386-server-6`
- `cdn-sync # syncs all previously synced channels`
- `cdn-sync -c rhel-i386-server-6 -c rhel-i386-server-5`
- `cdn-sync -c my-custom-channel --add-repo /content/dist/rhel/server/6/6Server/x86_64/sat-tools/6.2/os`
- `cdn-sync -c my-custom-channel # syncs custom channel with all previously added CDN repositories`
- `cdn-sync -c my-custom-channel -d /content/dist/rhel/server/6/6Server/x86_64/sat-tools/6.2/os`

## See Also

- rhn-satellite-activate(8)
- rhnpush(8)
- spacewalk-repo-sync(8)

## Authors

- Gennadii Altukhov galt@redhat.com
- Jan Dobes jdobes@redhat.com