Hello,
I use a crontab with a scrip to clean a archive.
I list a task with spacecmd schedule_list | grep “”
And spacecmd schedule_cancel number “id” I kill a archive .
The Script:
#!/bin/sh
fich="/srv/scripts/Clean-Tache-Spwalk/liste.txt"
spacecmd schedule_list | grep "Show differences between profiled config files
and deployed config files" > $fich
spacecmd schedule_list | grep "Deploy config files to system" >> $fich
spacecmd schedule_list | grep "Run an arbitrary script" >> $fich
ligne=`wc -l $fich | awk -F " " '{print $1}'`
x=0
echo "The number of line is $ligne"
echo "x=$x"
while [ "$x" -le "$ligne" ]; do
# echo "1------- $x"
id=`cat $fich | awk 'NR=='$x' {print $1}'`
echo "ID $id Delete"
spacecmd schedule_cancel $id
x=$(($x + 1))
echo "-------------$x"
done
De : [email protected]
[mailto:[email protected]] De la part de Ree, Jan-Albert van
Envoyé : mardi 15 novembre 2016 15:32
À : [email protected]
Objet : Re: [Spacewalk-list] Migrating to a physical
Ah yes, that can be an issue indeed, we only have a small installation with
around 80 clients
Cleaning up archived actions can be done from the GUI :
Schedule > Archived Actions > Select All > Delete Actions
I had roughly 50K archived actions there, in your case it might be a lot more.
--
Jan-Albert
Jan-Albert van Ree | Linux System Administrator | MARIN Support Group
MARIN | T +31 317 49 35 48 | [email protected]<mailto:[email protected]> |
www.marin.nl<http://www.marin.nl>
[LinkedIn]<https://www.linkedin.com/company/marin> [YouTube]
<http://www.youtube.com/marinmultimedia> [Twitter]
<https://twitter.com/MARIN_nieuws> [Facebook]
<https://www.facebook.com/marin.wageningen>
MARIN news: Operational performance of wind assisted
ships<http://www.marin.nl/web/News/News-items/Operational-performance-of-wind-assisted-ships-1.htm>
________________________________
From:
[email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>>
on behalf of Daryl Rose <[email protected]<mailto:[email protected]>>
Sent: Tuesday, November 15, 2016 14:07
To: [email protected]<mailto:[email protected]>
Subject: Re: [Spacewalk-list] Migrating to a physical
Jan-Albert,
Thank you for the feedback.
I considered going the direction that you went, but that really won't work for
me. The steps that I outlined are high level. I left out things like shutting
down SW, and changing DNS entry. (The IP address has to change going from VM
world to physical world). I also have a proxy server in the mix, so that means
that firewall rules have to be changed. Not looking forward to that either.
Networking isn't to receptive about changing firewall rules. :-(
<snip>
And you might want to clean up archived actions to make database backup /
restore a bit quicker
</snip>
I'm not really sure how to do this. I did a little research and I found this
example:
* archive_cleanup_command = 'pg_archivecleanup /mnt/server/archivedir %r'
I don't really think that this is what I need, or is it?
Thank you, and thank you for the feedback.
Daryl
________________________________
From:
[email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>>
on behalf of Ree, Jan-Albert van <[email protected]<mailto:[email protected]>>
Sent: Tuesday, November 15, 2016 1:50 AM
To: [email protected]<mailto:[email protected]>
Subject: Re: [Spacewalk-list] Migrating to a physical
We did something similar earlier this year.
However to prevent issues and allow for testing we did things a bit different :
- We installed a new server on which we created all the content we needed (we
used a new FQDN so we didn't have to do anything to allow for 2 servers in the
same network)
- Then I wrote a migration script which installed the new certificate package
and re-registered the machine to the new SW server
This allowed for more control as we did migration per server group and we would
never be left with unmanaged machines in the event the migration went wrong.
Your plan to me looks solid otherwise, although before step 1 I'd shut down the
spacewalk services to make sure nothing in the database gets changed.
And you might want to clean up archived actions to make database backup /
restore a bit quicker
Good luck
--
Jan-Albert
Jan-Albert van Ree | Linux System Administrator | MARIN Support Group
MARIN | T +31 317 49 35 48 | [email protected]<mailto:[email protected]> |
www.marin.nl<http://www.marin.nl>
[LinkedIn]<https://www.linkedin.com/company/marin> [YouTube]
<http://www.youtube.com/marinmultimedia> [Twitter]
<https://twitter.com/MARIN_nieuws> [Facebook]
<https://www.facebook.com/marin.wageningen>
MARIN news: Winaars Speurspel open
dag<http://www.marin.nl/web/News/News-items/Winaars-Speurspel-open-dag.htm>
________________________________
From:
[email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>>
on behalf of Daryl Rose <[email protected]<mailto:[email protected]>>
Sent: Monday, November 14, 2016 20:29
To: [email protected]<mailto:[email protected]>
Subject: [Spacewalk-list] Migrating to a physical
I'm migrating my SW environment from a VM to a physical. I have the physical
built, but before I move forward, I need to make sure that I'll have my steps
down. Please review my steps, and let me know if I missed anything.
1. Rename current SW to temporary name.
2. Rename physical from temporary name to actual FQDN.
3. Install latest version of SW (current installation was recently upgraded
to 2.5).
4. rsync following directories:
* /etc/jabberd
* /etc/rhn
* /etc/sysconfig/rhn
* /root/ssl
* /var/www/html/pub
* /var/satellite
1. Backup Postgres DB from VM
2. Restore Postgres DB to physical
One additional comment, I am using signed cert, so I need to make sure that
names and certificates are all correct, so I don't end up having issues with my
current connections.
If I'm missing something, or I have something wrong, please let me know.
Thank you.
Daryl
_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list