satellite-sync

8 Version 3.5.0

`satellite-sync`

Incrementally synchronize an Red Hat Satellite's DB data and RPM repository with a parent Red Hat Satellite and pulling content from channel dumps.

            satellite-sync
            options ...
            -mDIRECTORY
            --mount-point=DIRECTORY

             -l --list-channels

            -cCHANNEL
            --channel=CHANNEL

            --iss-parent=ISS_PARENT

            -p --print-configuration

            --step=[channels|rpms|packages|errata|kickstarts]

            --no-rpms

            --no-packages

            --no-ssl

            --force-all-errata

            --no-errata

            --no-kickstarts

            --keep-rpms

            --master

            --debug-level=DEBUG_LEVEL

            --email

            --traceback-mail=EMAIL_ADDESS(ES)

            -sHOSTNAME
            --server=HOSTNAME

            --ignore-proxy

            --http-proxy=HOSTNAME:PORT

            --http-proxy-username=USERNAME

            --http-proxy-password=PASSWORD

            --ca-cert=SSL_CA_CERT_FULL_PATH

            --orgid=ORGID

            --systemid=SYSTEMID_PATH

            --batch-size=BATCH_SIZE

            --list-error-codes

            --no-ssl

            --sync-to-temp

            -h --help

            --usage

## Description

The &RHNSYNC; (satellite-sync) synchronizes a &RHNSAT; with a parent Red Hat Satellite server.

This tool enables a &RHNSAT; to update its database metadata and RPM packages with that of parent Red Hat Satellite. This action can be performed via the internet (ie. directly) or via the local file-system (an update/channel CD dumped to the appropriate mount point).

Options set by default if no options given: --cache-refresh-level 2, and all --step options.

The --step options describe a step in a process (channels, rpms, packages, errata, kickstarts). I.e. by default, the process is:

- 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

Each option is dependent on the other. So, for example, if you use "--step packages" and no other option, all other steps that occur prior to the "packages" step will be performed as well.

As can be imagined, "--step channels" is called for nearly all operations.

## Options

-h, --help

- Display the help screen with a list of options.

--usage

- Display the usage options for satellite sync.

-m`DIRECTORY`, --mount-point=`DIRECTORY`

- mount point for import : disk update or disconnected install only.

--consider-full

- When this option is used, the export being synced from disk dump will be considered to be a full export; any package in the channel but not in the export will be deleted. Without this option all disk dumps are interpreted as incremental dumps. This option has sense only for --mount-point. Sync via ISS is always considered as full sync.

--include-custom-channels

- When satellite-sync is run without the -c/--channel options, traditionally only Red Hat channels (with null org) are resynced. With this option, existing custom channels are also synced from the channel dump, regardless of whether they were created by previous satellite-sync run or manually.

-l, --list-channels

- list all available channels for import/syncing and exit.

-c`CHANNEL`, --channel=`CHANNEL`

- process data for this channel only.

--iss-parent

- parent satellite to import content from.

-p, --print-configuration

- print the current configuration and exit.

--no-ssl

- turn off SSL (not recommended).

--no-rpms

- do not fetch actual rpms.

--no-packages

- do not process full package metadata.

--no-errata

- do not process errata data.

--no-kickstarts

- do not process kickstart data (provisioning feature).

--keep-rpms

- do not remove rpms when importing from local dump.

--master

- the fully qualified domain name of the master Satellite. Valid with --mount-point only. Required if you want to import org data and channel permissions.

--force-all-errata

- forcibly process all errata metadata regardless of diff results.

--debug-level=`DEBUG_LEVEL`

- Override the level (amount) of messaging to both the log files and the screen. This debug level is set in /etc/rhn/rhn.conf (the debug variable). The default setting (for normal levels of messaging) is 2. --debug-level can be set to a level between 0 (nearly no messaging) to 6 (insane amount of messaging).

--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".

-s`HOSTNAME`, --server=`HOSTNAME`

- alternative server with which to connect (hostname).

## DEBUGGING and EXPERIMENTAL Options

--step=[`channels|rpms|packages|errata|kickstarts`]

- DEBUG ONLY:

  Perform the sync process *only* to the step specified

  channels

- process channel data. This option will automatically enable the "arches" step.

rpms

- fetch rpms and fill repository. This option will automatically enable the "channels" step.

packages

- process full package metadata (can be very slow). This option will automatically enable the "rpms" step.

errata

- process errata data. This option will automatically enable the "channels" step.

kickstarts

- process kickstart data (metadata and files) for provisioning. This option will automatically enable the "channels" step.

--ignore-proxy

- Do not use an http proxy under any circumstances

--http-proxy=`HOSTNAME:PORT`

- alternative http proxy (hostname:port)

--http-proxy-username=`USERNAME`

- alternative http proxy username

--http-proxy-password=`PASSWORD`

- alternative http proxy password

--ca-cert=`SSL_CA_CERT_FULL_PATH`

- alternative SSL CA Cert (fullpath to cert file)

--orgid=`ORGID`

- Organization to which the sync imports data. The default is to the administrator's account.

--systemid=`SYSTEMID_PATH`

- DEBUG ONLY: alternative path to digital system id. This option is generally only useful for internal testing.

--batch-size=`BATCH_SIZE`

- DEBUG ONLY: maximum batch-size for XML/database-import processing (1..50).

  This option should not be used except for debugging purposes. The most useful case being --batch-size=1 where the XML parser and 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.

--list-error-codes

- list the possible exit codes for satellite-sync

--sync-to-temp

- stream content being synchronized to a tempfile

  On heavily-loaded systems, or network topologies with short timeouts, it is possible for a satellite-sync to abort with 'IncompleteRead: IncompleteRead(..)', and a UnicodeDecodeError in the sync-logs. This is the result of a partial read in the midst of a GzipStream.

  This option tells satellite-sync to stream content being synchronized to a local tempfile prior to passing it to the rest of the satellite-sync processing, which alleviates this issue.

  This option can be made the default for all satellite-syncs by setting the configuration option 'sync_to_temp = 1' in /etc/rhn/rhn.conf.

## Examples

- `satellite-sync -m /var/tmp/channel-dumps --list-channels`
- `satellite-sync -m /var/tmp/channel-dumps -c rhel-x86_64-server-7`
- `satellite-sync --iss-parent=stage-satellite.yourorg.com -c rhel-x86_64-server-7`

## See Also

- db-control(1) - embedded database environment only!
- rhn-charsets(8)
- rhnpush(8)
- rhn-schema-version(8)
- rhn-ssl-dbstore(8)

## Authors

- Todd Warner taw@redhat.com
- Mihai Ibanescu misa@redhat.com
- Pradeep Kilambi pkilambi@redhat.com