<div dir="ltr"><div><div><div><div><div><div><div>check out the spacewalk-channel, rhn-profile-sync, and spacecmd commands they may help<br></div>the bad news is there is no command line tool that I've seen yet to manage locally managed (host specific) files, although it looks like it should be possible through the XML RPC APIs so ive been thinking of making some tools in the future for this, and putting in an RFE for it in the existing tool.<br>
<br></div>The tool I was thinking of writing would be inspired by the old Yast Backup tool essentially find all the files, directories, symlinks etc. under a directory specified by the user then do the following<br></div>
 1) check if the file is part of an rpm if so do a rpm verify to see if the file has changed<br></div> 2) if the file was part of an RPM and has changed see if it is currently managed by spacewalk.<br></div> 3) if the file is part of the RPM has changed and is not managed by spacewalk import it to the locally managed sandbox<br>
</div> 4) if the file is not part of an RPM see if its currently managed by spacewalk<br></div> 5) if the file is not currently managed by spacewalk and is not part of an RPM add it to the locally managed sandbox<div><div>
<div><div><div><br></div><div>what do you think?<br><br><br></div></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 12, 2013 at 10:16 AM, Nick Tailor <span dir="ltr"><<a href="mailto:HTailor@bclc.com" target="_blank">HTailor@bclc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div link="blue" vlink="purple" lang="EN-CA">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Yes,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">So these machines are already registered to space-walk.
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">However, everytime I do patch, I create a clone channel. So I also need to create a new stored profile before I use the new channel to update patches to do
 restores in case of issues, to do this everytime one at at time is tedious from the gui.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Is there a cli way to created registered machines stored profiles?</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Cheers</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";color:#76b900">Nick Tailor</span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#414b56">Senior Linux Systems Administrator</span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#414b56" lang="EN-US"></span></p>

<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#414b56">BCLC, 2940 Virtual Way, Vancouver B.C. V5M 0A6</span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#414b56" lang="EN-US"></span></p>

<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#76b900" lang="FR-CA">T</span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:navy" lang="FR-CA">
</span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#414b56" lang="FR-CA"><a href="tel:604%C2%A0228%203046" value="+16042283046" target="_blank">604 228 3046</a></span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:navy" lang="FR-CA"> 
</span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#76b900" lang="FR-CA">C</span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:navy" lang="FR-CA">
</span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#414b56" lang="FR-CA"><a href="tel:778%20388%201397" value="+17783881397" target="_blank">778 388 1397</a></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;color:#414b56" lang="FR-CA"> </span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#414b56" lang="FR-CA">Connect with us:</span></p>
<p class="MsoNormal"><span style="color:#1f497d" lang="EN-US"><a href="http://twitter.com/BCLC" target="_blank"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#414b56" lang="FR-CA">Twitter @BCLC</span></a></span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#414b56" lang="FR-CA">|
</span><span style="font-family:"Arial","sans-serif";color:#1f497d" lang="EN-US"><a href="http://twitter.com/BCLCGameSense" target="_blank"><span style="font-size:9.0pt;color:#414b56" lang="FR-CA">Twitter @BCLCGameSense</span></a></span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#414b56" lang="FR-CA">
 | </span><span style="font-family:"Arial","sans-serif";color:#1f497d" lang="EN-US"><a href="http://youtube.com/user/BCLCPlayingItRight/videos" target="_blank"><span style="font-size:9.0pt;color:#414b56" lang="FR-CA">YouTube</span></a></span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#414b56" lang="FR-CA">
 | </span><span style="font-family:"Arial","sans-serif";color:#1f497d" lang="EN-US"><a href="http://blogs.bclc.com/" target="_blank"><span style="font-size:9.0pt;color:#414b56" lang="FR-CA">Blog</span></a></span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#414b56" lang="FR-CA">
 | </span><span style="font-family:"Arial","sans-serif";color:#1f497d" lang="EN-US"><a href="http://www.bclc.com/" target="_blank"><span style="font-size:9.0pt;color:#414b56" lang="FR-CA">bclc.com</span></a></span><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#414b56"></span></p>

<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#76b900">Last year, more than $1 billion generated by BCLC gambling activities went back into health care, education and community groups across B.C.</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> <a href="mailto:spacewalk-list-bounces@redhat.com" target="_blank">spacewalk-list-bounces@redhat.com</a> [mailto:<a href="mailto:spacewalk-list-bounces@redhat.com" target="_blank">spacewalk-list-bounces@redhat.com</a>]
<b>On Behalf Of </b>Paul Robert Marino<br>
<b>Sent:</b> April-11-13 3:37 PM<br>
<b>To:</b> <a href="mailto:spacewalk-list@redhat.com" target="_blank">spacewalk-list@redhat.com</a><br>
<b>Subject:</b> Re: [Spacewalk-list] Created stored profiles via spacewalk cli</span></p><div><div class="h5">
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Well what do you mean by that?<br>
Do you mean creating a profile for a server that doesn't exist yet or do you mean creating a profile for a server already registered to spacewalk?<br>
Please clarify.<br>
<br>
</p>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#999999">-- Sent from my HP Pre3</span></p>
</div>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:navy"> </span></p>
<div class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:navy">
<hr size="2" width="75%" align="left">
</span></div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Verdana","sans-serif";color:navy">On Apr 11, 2013 6:03 PM, Nick Tailor <<a href="mailto:HTailor@bclc.com" target="_blank">HTailor@bclc.com</a>> wrote:
</span></p>
<div>
<p class="MsoNormal">Hello,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Does anyone know if there is a way to create stored profiles via spacewalk command line?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I have a bunch of servers to do and doing each one, one by one is a bit tedious.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Cheers</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";color:#76b900">Nick Tailor</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
</div>
<div class="MsoNormal" style="text-align:center" align="center">
<hr size="2" width="100%" align="center">
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">This email is intended only for the addressee. It may contain confidential or proprietary information that cannot be disclosed without BCLC's permission. If you have received
 this email in error, please notify the sender immediately and delete the email.</span>
</p>
</div></div></div><div><div class="h5">
<hr>
<font face="Arial">This email is intended only for the addressee. It may contain confidential or proprietary information that cannot be disclosed without BCLC's permission. If you have received this email in error, please notify the sender immediately
 and delete the email.</font>
</div></div></div>

<br>_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br></blockquote></div><br></div>