Automagically copying a folder between qubes

Good morning,

Is there a way to script the automatic rsyncing (or copying) of a folder from one qube to another, e.g., every 10 mins?

I have a folder which I regulary backup to a remote service, and it means I have to have a persistent and active NetVM in place in order to do this.

I’d like to move to a situation where there is something like:

Qube1/Folder => copy => Qube2/Folder => Cronjob => Offsite backup

Does this have to be set in Dom0? Can you use crontab or something similar there?
Is there some other way to handle this?

Thanks!

JAQU

You can do this by using rsync over qrexec - I’ve explained the set-up
here.
You could run this by cron - the script you use should check whether
there’s an active and connected network qube, obviously.
I’d call this from dom0 for that reason.

You could use a simple script in Qube 1, which used inotifywait to
trigger the rsync calls on changes to the Folder.

You could also use syncthing to keep the qubes in sync, and possibly
syncthing out to your remote storage.
I’ve packaged syncthing setup as an rpm to install in dom0 - it includes
syncthing over qrexec, for easy transfer between qubes. It’s available
using qubes-task

If you need help on either approach, ask.

I never presume to speak for the Qubes team. When I comment in the Forum or in the mailing lists I speak for myself.
3 Likes