Import config files via command line - Satellite 5.6

Latest response

Does anyone know how to import config files from client machines using the command line? On the Satellite 5.6 web interface, it is simple...

configuration->Add files->Import Files

Then simply type in the path of the file that you want to import and click "Import Configuration Files", then confirm. Once rhn_check runs on the target machine, the file gets uploaded to the Sandbox area, from where you can download them.

There is absolutely no mention of this function in the command line references that I have seen. I've tried using

$ spacecmd system_addconfigfile

But that has the functionality of...

Configuration->Add Files->Upload File

...which is not what I want. I want to be able to retrieve a file that has been generated on a server and upload it to Satellite. I then want to download it from the Sandbox are and place it in a directory of my choosing. I want to do all this via the command line.

If anyone can help by providing information on...
1. How to import a file by command line
2. How to download that file from Sandbox into the filesystem

...then I would be most grateful

Many thanks

Responses

You want rhncfg-manager

Thanks Rich. From reading what I can find, rhncfg-manager seems only to deal with channels. What I want to do is to download a specific config file from a specific host. the file isn't in any channels yet. Like I say, I want the functionality of Configuration->Add files->Import Files

Thanks Rich... However rhncfg-manager isn't on the satellite server box. I'm assuming that means that I have to install it?

Additionally, from reading what I can find, rhncfg-manager seems only to deal with channels. What I want to do is to download a specific config file from a specific host. the file isn't in any channels yet. Like I say, I want the functionality of Configuration->Add files->Import Files

thanks

Alastair,

Rich Jerrido is [generally always] correct, please see the list of replies in context below ---> I have a satellite 5.6 left (we're transitioning to 6.2.11), and I just checked, we have rhncfg-manager

While the command named "rhncfg-manager" is available on my satellite 5.6 server (I just checked), I don't see documentation covering it. So that being said, look at https://access.redhat.com/documentation/en-us/red_hat_satellite/5.8/html/user_guide/sect-red_hat_network_configuration_manager#Adding_Files_to_a_Config_Channel I'm trying to find the specific link.

And/or type rhncfg-manager --help

I do realize you are trying to get a file [from] a client system [to] the satellite server. From what I've read, rhncfg-manager will do that, the question is with the lack of documentation, yet the mere existence of the command - if the functionality is there. hope it works. If not use the web UI as you specified.

if needed, type yum provides */rhncfg-manager and install the resultant rpm (I'd be surprised if it is not already there)

rpm name (if oddly not installed) = rhncfg-management from Spacewalk Configuration Management Client, hopefully you have that specific channel.

4.3.2. Adding Files to a Configuration Channel https://access.redhat.com/documentation/en-us/red_hat_satellite/5.8/html/user_guide/sect-red_hat_network_configuration_manager#Adding_Files_to_a_Config_Channel

To add a file to a config channel, specify the channel label as well as the local file to be uploaded, such as:

rhncfg-manager add --channel=channel-label /path/to/file

there are additional examples for uploading files using this that I did not include here.

On your satellite 5.6 system, see the man page for rhncfg-manager - there are listed options for adding a file to a config channel in the man page as well (I just checked this on my remaining satellite 5.6 server, just now).

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.