Re: [qubes-users] Management of salt configs: Syncing from dom0 to a git-repository harboring vm?

2021-05-02 Thread Manuel Amador (Rudd-O)

On 03/04/2021 18.42, balin wrote:

Hi,
I urgently need to backup (and version control) my by now relative 
elaborate salt config.



You could try this: https://github.com/Rudd-O/git-remote-qubes 



--

Rudd-O
https://rudd-o.com/

--
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/cb8870e8-4c9d-68b0-f5ba-7b9351f5ccf0%40rudd-o.com.


OpenPGP_signature
Description: OpenPGP digital signature


Re: [qubes-users] Management of salt configs: Syncing from dom0 to a git-repository harboring vm?

2021-04-05 Thread unman
On Sun, Apr 04, 2021 at 03:01:52PM +0100, unman wrote:
> On Sat, Apr 03, 2021 at 10:45:59AM -0700, balin wrote:
> > I see. that seems straight forward then ... how time consuming is such a 
> > move?
> > 
> > Sincerely, Joh
> > 
> > On Saturday, April 3, 2021 at 7:36:02 PM UTC+2 unman wrote:
> > 
> > > On Sat, Apr 03, 2021 at 09:42:49AM -0700, balin wrote:
> > > > Hi,
> > > > I urgently need to backup (and version control) my by now relative 
> > > > elaborate salt config.
> > > > 
> > > > The plan is to manage it in a `git` repo in a dedicated Vm (whether I 
> > > push 
> > > > it to some private online repo still needs some contemplation).
> > > > A shell script will
> > > > a) copy/sync the salt dir to the `git` vm
> > > > b) execute git add/commit(and possibly push) there
> > > > 
> > > > >From this proposition the need arises to sync an entire directory from 
> > > > `dom0` to the `git` vm. I found 
> > > > `https://www.qubes-os.org/doc/copy-from-dom0/` 
> > >  and consequently 
> > > `qvm-copy-to-vm 
> > > >  ` ...
> > > > I can see a workflow of packing the salt dir to a *.zip or some such, 
> > > > copying that, unpacking it on the `git` vm through `qrexec` and 
> > > preoceeding 
> > > > with git operations ... somewhat inelegant.
> > > > Is there any other means of syncing an entire directory tree from 
> > > > `dom0` 
> > > to 
> > > > a vm?
> > > > 
> > > > Thanks for any pointers.
> > > > 
> > > > Sincerely, Joh
> > > > 
> > >
> > > qvm-copy-to-vm will take a directory as an argument.
> > > You will have to then sync the files from QubesIncoming/dom0 to your git
> > > repo, but that is trivial.
> > >
> 
> Not at all time consuming.
> A simple script in dom0 to :
> qvm-copy-to-vm
> copy in the qube
> git push in the qube
> 
> I have something you could look at - I'll post it in the morning.
> 

Something like:
```
#!/usr/bin/bash
qvm-copy-to-vm $1 $2
qvm-run $2 'mv /home/user/QubesIncoming/dom0/$1/* '
qvm-run $2 'rm -rf /home/user/QubesIncoming/dom0/$1 '
```
in dom0.

Depending on how you have configured git access you may also be able to
commit and push as part of the same script. Without knowing your
configuration I suspect that the rest wont be helpful.
(Hint - just try at the coommand line in dom0 - get it working and then
add to the script.)

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20210405141651.GB9457%40thirdeyesecurity.org.


Re: [qubes-users] Management of salt configs: Syncing from dom0 to a git-repository harboring vm?

2021-04-04 Thread unman
On Sat, Apr 03, 2021 at 10:45:59AM -0700, balin wrote:
> I see. that seems straight forward then ... how time consuming is such a 
> move?
> 
> Sincerely, Joh
> 
> On Saturday, April 3, 2021 at 7:36:02 PM UTC+2 unman wrote:
> 
> > On Sat, Apr 03, 2021 at 09:42:49AM -0700, balin wrote:
> > > Hi,
> > > I urgently need to backup (and version control) my by now relative 
> > > elaborate salt config.
> > > 
> > > The plan is to manage it in a `git` repo in a dedicated Vm (whether I 
> > push 
> > > it to some private online repo still needs some contemplation).
> > > A shell script will
> > > a) copy/sync the salt dir to the `git` vm
> > > b) execute git add/commit(and possibly push) there
> > > 
> > > >From this proposition the need arises to sync an entire directory from 
> > > `dom0` to the `git` vm. I found 
> > > `https://www.qubes-os.org/doc/copy-from-dom0/` 
> >  and consequently 
> > `qvm-copy-to-vm 
> > >  ` ...
> > > I can see a workflow of packing the salt dir to a *.zip or some such, 
> > > copying that, unpacking it on the `git` vm through `qrexec` and 
> > preoceeding 
> > > with git operations ... somewhat inelegant.
> > > Is there any other means of syncing an entire directory tree from `dom0` 
> > to 
> > > a vm?
> > > 
> > > Thanks for any pointers.
> > > 
> > > Sincerely, Joh
> > > 
> >
> > qvm-copy-to-vm will take a directory as an argument.
> > You will have to then sync the files from QubesIncoming/dom0 to your git
> > repo, but that is trivial.
> >

Not at all time consuming.
A simple script in dom0 to :
qvm-copy-to-vm
copy in the qube
git push in the qube

I have something you could look at - I'll post it in the morning.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20210404140152.GB4211%40thirdeyesecurity.org.


Re: [qubes-users] Management of salt configs: Syncing from dom0 to a git-repository harboring vm?

2021-04-03 Thread balin
I see. that seems straight forward then ... how time consuming is such a 
move?

Sincerely, Joh

On Saturday, April 3, 2021 at 7:36:02 PM UTC+2 unman wrote:

> On Sat, Apr 03, 2021 at 09:42:49AM -0700, balin wrote:
> > Hi,
> > I urgently need to backup (and version control) my by now relative 
> > elaborate salt config.
> > 
> > The plan is to manage it in a `git` repo in a dedicated Vm (whether I 
> push 
> > it to some private online repo still needs some contemplation).
> > A shell script will
> > a) copy/sync the salt dir to the `git` vm
> > b) execute git add/commit(and possibly push) there
> > 
> > >From this proposition the need arises to sync an entire directory from 
> > `dom0` to the `git` vm. I found 
> > `https://www.qubes-os.org/doc/copy-from-dom0/` 
>  and consequently 
> `qvm-copy-to-vm 
> >  ` ...
> > I can see a workflow of packing the salt dir to a *.zip or some such, 
> > copying that, unpacking it on the `git` vm through `qrexec` and 
> preoceeding 
> > with git operations ... somewhat inelegant.
> > Is there any other means of syncing an entire directory tree from `dom0` 
> to 
> > a vm?
> > 
> > Thanks for any pointers.
> > 
> > Sincerely, Joh
> > 
>
> qvm-copy-to-vm will take a directory as an argument.
> You will have to then sync the files from QubesIncoming/dom0 to your git
> repo, but that is trivial.
>

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/172b16bc-992b-4551-a9ec-4ff1e875f5aen%40googlegroups.com.


Re: [qubes-users] Management of salt configs: Syncing from dom0 to a git-repository harboring vm?

2021-04-03 Thread unman
On Sat, Apr 03, 2021 at 09:42:49AM -0700, balin wrote:
> Hi,
> I urgently need to backup (and version control) my by now relative 
> elaborate salt config.
> 
> The plan is to manage it in a `git` repo in a dedicated Vm (whether I push 
> it to some private online repo still needs some contemplation).
> A shell script will
> a) copy/sync the salt dir to the `git` vm
> b) execute git add/commit(and possibly push) there
> 
> >From this proposition the need arises to sync an entire directory from 
> `dom0` to the `git` vm. I found 
> `https://www.qubes-os.org/doc/copy-from-dom0/` and consequently 
> `qvm-copy-to-vm 
>  ` ...
> I can see a workflow of packing the salt dir to a *.zip or some such, 
> copying that, unpacking it on the `git` vm through `qrexec` and preoceeding 
> with git operations ... somewhat inelegant.
> Is there any other means of syncing an entire directory tree from `dom0` to 
> a vm?
> 
> Thanks for any pointers.
> 
> Sincerely, Joh
> 

qvm-copy-to-vm will take a directory as an argument.
You will have to then sync the files from QubesIncoming/dom0 to your git
repo, but that is trivial.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20210403173559.GE32370%40thirdeyesecurity.org.