You can also find this document located within official documentation: https://www.suse.com/documentation/suse-manager-3/book_suma_best_practices/data/sub_mgr_tool.html
- Install SMT in the external network with an NCC or SCC connection.
- Mirror all needed repositories.
- Create a "database replacement file":
smt-sync --createdbreplacementfile /tmp/dbrepl.xml
- Mount your external hard disk or usb stick.
- Export the data to the mounted media:
smt-sync --todir /media/disk/ smt-mirror --dbreplfile /tmp/dbrepl.xml --directory /media/disk \ --fromlocalsmt -L /var/log/smt/smt-mirror-export.log
Note: smt-sync also exports the subscription and entitlement data. To keep SUSE Manager up-to-date with the amount of subscriptions and entitlements, you must export and import these data frequently.
- Create a symbolic link from repo/SUSE to SUSE on the top level of the mounted media:
cd /media/disk/ ln -s repo/SUSE SUSE
- Make sure all of the exported repomd.xml files exist under repodata directories and not .repodata directories:
cd /media/disk for hasDot in `find $PWD/ -name .repodata -print ` ;\ do theDir=`dirname $hasDot` ; \ (cd $theDir ; ln -s .repodata repodata) ;\ done
- Unmount the disk, carry it to your SUSE Manager, and mount it there.
- Specify the local path on the SUSE Manager Server in /etc/rhn/rhn.conf (mandatory for SCC using mgr-sync):
server.susemanager.fromdir = /media/disk
- Restart Tomcat:
- Do a full sync before doing anything else:
mgr-sync refresh # SCC - requires fromdir in rhn.conf
- On SUSE Manager mgr-sync can be used now as usual.
mgr-sync list channels mgr-sync add channel <channel-label>
Be careful. The disk must be available always at the same mount point. Do not trigger a sync, if the disk is not mounted. If you have already added a channel from a local repository path, you will not be able to change its URL to point to a different path afterwards.