Using mgr-sync

The mgr-sync tool is used at the command prompt. It provides functions for using SUSE Multi-Linux Manager that are not always available in the Web UI. The primary use of mgr-sync is to connect to the SUSE Customer Center, retrieve product and package information, and prepare channels for synchronization with the SUSE Multi-Linux Manager Server.

此工具应与 SUSE 支持订阅配合使用。openSUSE、CentOS 和 Ubuntu 等开源发行套件不需要此工具。

The available commands and arguments for mgr-sync are listed in this table. Use this syntax for mgr-sync commands:

mgr-sync [-h] [--version] [-v] [-s] [-d {1,2,3}] {list,add,refresh,delete}
Table 1. mgr-sync 命令
Command Description Example Use

list

List channels, organization credentials, or products

mgr-sync list channels

add

Add channels, organization credentials, or products

mgr-sync add channel <channel_name>

refresh

Refresh the local copy of products, channels, and subscriptions

mgr-sync refresh

delete

Delete existing SCC organization credentials from the local system

mgr-sync delete credentials

sync

Synchronize specified channel or ask for it when left blank

mgr-sync sync channel <channel_name>

要查看特定于某个命令的完整选项列表,请使用以下命令:

mgr-sync <命令> --help
Table 2. mgr-sync 可选参数
Option Abbreviated option Description Example Use

help

h

Display the command usage and options

mgr-sync --help

version

N/A

Display the currently installed version of mgr-sync

mgr-sync --version

verbose

v

Provide verbose output

mgr-sync --verbose refresh

store-credentials

s

Store credentials a local hidden file

mgr-sync --store-credentials

debug

d

Log additional debugging information. Requires a level of 1, 2, 3. 3 provides the highest amnount of debugging information

mgr-sync -d 3 refresh

no-sync

N/A

Use with the add command to add products or channels without beginning a synchronization

mgr-sync --no-sync add <channel_name>

Logs for mgr-sync are located in:

  • /var/lib/containers/storage/volumes/var-log/_data/rhn/mgr-sync.log

  • /var/lib/containers/storage/volumes/var-log/_data/rhn/rhn_web_api.log