Equivalent command to spacewalk-repo-sync on Satellite 6 ?

Latest response

What's the command equivalent to "spacewalk-repo-sync" on Satellite 6 to sync the local custom repos?

Responses

Satellite 6 has a CLI tool named hammer.

To synchronise a single repository:

hammer repository synchronize --id <ID>

To list all repositories, and identify the ID of the repository you want to synchronise:

hammer repository list

Russell, Thanks. I have been actually using hammer commands to sync Red Hat repos, I asked because that's not working on a local custom repo and I have no clue why. I even manually uploaded RPMs using hammer to that custom repo and tried running 'sync' from both hammer CLI and web GUI, but no luck so far.

RPM1004: Error retrieving metadata: notresolvable

Shisheer--

You are trying to fix the "synchronize" process, but what I am saying (maybe didn't make clear enough in the other thread) is that you don't need to run the sync process at all for a local repo which you have already loaded RPMS into using hammer. The purpose of the "synchronize" operation is to bring in content from outside of your Satellite server (usually Red Hat, EPEl, third-party vendors like Dell/HP/Vmware, etc.). For your case, where the content is generated locally (literally, a build process that runs on the Satellite server according to your other post), there is nothing to "synchronize" with, so you don't need to 'sync' that repo at all. Just have your build system put the new RPMs in via "hammer content-upload..." every time a new version is built.

That is how I handle custom content in my Satellite 6 implementation; Red Hat & 3rd-party content (EPEL, vmware) repositories are all updated by a daily "Sync Plan", but my custom / local repositories have the "URL" field blank, no Sync Plan, and I never push the "sync" button in the GUI. The only thing I need to do is upload new versions of the RPMs when I build (or acquire) them, and Publish a new Version of the affected Content Views so the clients can see the new versions via "yum" commands (update, check-update, list available, etc.).

If I had multiple Satellite servers, it would be different - one Satellite would be the "master" source, where my custom repos are updated via "hammer content upload", but no synchronization; the others would have daily sync plans that use the "Published at" URL from the master Satellite server to synchronize the custom repos.

Hello James, Thanks a lot for a clear explanation. This is exactly what I was looking for an answer and will definitely solve my dilemma. I apologize if my question was not clear in the previous thread. Transition from Spacewalk to Satellite 6 has been a very challenging task.

hammer content-upload --help

Error: No such sub-command 'content-upload'.

See: 'hammer --help'.