Re: Moving /var/cfengine

"'Nick Anderson' via help-cfengine" <[email protected]> Thu, 27 Feb 2025 12:17:38 -0800 (PST)
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
------=_Part_56670_414542650.1740687458891
Content-Type: multipart/alternative; 
	boundary="----=_Part_56671_1933755076.1740687458891"

------=_Part_56671_1933755076.1740687458891
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Weird, I have some memory of answering similar within the past few weeks.=
=20
Maybe my flesh brain is breaking down.

selinux contexts might not be handled with that but that's the only thing=
=20
that jumps to mind.

On Thursday, February 27, 2025 at 8:41:30=E2=80=AFAM UTC-6 Beto wrote:

> Hi Craig,
>
> That's pretty much the process I was thinking of using.  I haven't tried=
=20
> it yet as other priorities have taken over.  I'll post results once I get=
=20
> to try it.
>
> Thanks for replying!
>
> On Tuesday, February 25, 2025 at 7:57:13=E2=80=AFAM UTC-6 craig.c...@nort=
hern.tech=20
> wrote:
>
>> Hello!
>>
>> Sorry this one hasn't had any responses. Did you figure something out?
>>
>> This /var/cfengine path is hard-coded into CFEngine at compile time. It=
=20
>> is referred to as WORKDIR:
>>
>>
>> https://docs.cfengine.com/docs/3.24/reference-special-variables-sys.html=
#sys-workdir
>>
>> If you need to migrate to new storage I might suggest this untested=20
>> procedure:
>>
>> - shut CFEngine down with something like `systemctl stop cfengine3`
>> - double-checking that all CFEngine related processes are not running=20
>> with something like `ps -efl | grep cf`
>> - moving the current directory aside: `mv /var/cfengine /var/old-cfengin=
e`
>> - mounting your new storage as `/var/cfengine`
>> - using rsync to copy everything over: `rsync -avz /var/old-cfengine/=20
>> /var/cfengine/`
>> - restart services with `systemctl start cfengine3`
>>
>> I haven't had occasion to perform such a migration so take this as a=20
>> suggested course to be considered carefully as you plan.
>>
>> Let us know how it goes or if you have more questions.
>>
>> -Craig
>> On Friday, February 7, 2025 at 8:25:35=E2=80=AFAM UTC-6 Beto wrote:
>>
>>> I need to move an Enterprise hub to new storage on the same server.  I'=
m=20
>>> thinking of using rsync for this:
>>>
>>> rsync -avz /var/cfengine /var/new_cfengine
>>>
>>> Of course everything would first be shut down.
>>>
>>> Has anyone tried this?  I have a low pain tolerance lol.
>>>
>>

--=20
You received this message because you are subscribed to the Google Groups "=
help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/help-cfengi=
ne/bdcbbef4-1df8-4ac2-8078-4eacb71522a6n%40googlegroups.com.

------=_Part_56671_1933755076.1740687458891
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Weird, I have some memory of answering similar within the past few weeks. M=
aybe my flesh brain is breaking down.<div><br /></div><div>selinux contexts=
 might not be handled with that but that's the only thing that jumps to min=
d.<br /><br /></div><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"g=
mail_attr">On Thursday, February 27, 2025 at 8:41:30=E2=80=AFAM UTC-6 Beto =
wrote:<br/></div><blockquote class=3D"gmail_quote" style=3D"margin: 0 0 0 0=
.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Cra=
ig,<div><br></div><div>That&#39;s pretty much the process I was thinking of=
 using.=C2=A0 I haven&#39;t tried it yet as other priorities have taken ove=
r.=C2=A0 I&#39;ll post results once I get to try it.<br><br>Thanks for repl=
ying!<br><br></div><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gm=
ail_attr">On Tuesday, February 25, 2025 at 7:57:13=E2=80=AFAM UTC-6 craig.c=
[email protected] wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:=
1ex">Hello!<div><br></div><div>Sorry this one hasn&#39;t had any responses.=
 Did you figure something out?</div><div><br></div><div>This /var/cfengine =
path is hard-coded into CFEngine at compile time. It is referred to as WORK=
DIR:</div><div><br></div><div><a href=3D"https://docs.cfengine.com/docs/3.2=
4/reference-special-variables-sys.html#sys-workdir" rel=3D"nofollow" target=
=3D"_blank" data-saferedirecturl=3D"https://www.google.com/url?hl=3Den&amp;=
q=3Dhttps://docs.cfengine.com/docs/3.24/reference-special-variables-sys.htm=
l%23sys-workdir&amp;source=3Dgmail&amp;ust=3D1740773642058000&amp;usg=3DAOv=
Vaw3L1gF01OLtEQvl02suxii8">https://docs.cfengine.com/docs/3.24/reference-sp=
ecial-variables-sys.html#sys-workdir</a></div><div><br></div><div>If you ne=
ed to migrate to new storage I might suggest this untested procedure:</div>=
<div><br></div><div>- shut CFEngine down with something like `systemctl sto=
p cfengine3`</div><div>- double-checking that all CFEngine related processe=
s are not running with something like `ps -efl | grep cf`<br>- moving the c=
urrent directory aside: `mv /var/cfengine /var/old-cfengine`</div><div>- mo=
unting your new storage as `/var/cfengine`</div><div>- using rsync to copy =
everything over: `rsync -avz /var/old-cfengine/ /var/cfengine/`</div><div>-=
 restart services with `systemctl start cfengine3`</div><div><br></div><div=
>I haven&#39;t had occasion to perform such a migration so take this as a s=
uggested course to be considered carefully as you plan.</div><div><br></div=
><div>Let us know how it goes or if you have more questions.</div><div><br>=
</div><div>-Craig</div><div class=3D"gmail_quote"><div dir=3D"auto" class=
=3D"gmail_attr">On Friday, February 7, 2025 at 8:25:35=E2=80=AFAM UTC-6 Bet=
o wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I need to mov=
e an Enterprise hub to new storage on the same server.=C2=A0 I&#39;m thinki=
ng of using rsync for this:<div><br></div><div><font face=3D"Courier New">r=
sync -avz /var/cfengine /var/new_cfengine</font></div><div><br></div><div>O=
f course everything would first be shut down.</div><div><br></div><div>Has =
anyone tried this?=C2=A0 I have a low pain tolerance lol.</div></blockquote=
></div></blockquote></div></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;help-cfengine&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">help-=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
help-cfengine/bdcbbef4-1df8-4ac2-8078-4eacb71522a6n%40googlegroups.com?utm_=
medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/help-=
cfengine/bdcbbef4-1df8-4ac2-8078-4eacb71522a6n%40googlegroups.com</a>.<br /=
>

------=_Part_56671_1933755076.1740687458891--

------=_Part_56670_414542650.1740687458891--