Import config files via command line - Satellite 5.6
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
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.
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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
