How to backup to remote via ssh in Qubes Manager

231 views
Skip to first unread message

nrg...@gmail.com

unread,
Sep 10, 2014, 5:23:38 PM9/10/14
to qubes...@googlegroups.com
I have seen reference to the ability to be able to backup the domains to a remote location using ssh.

My local instance of Qubes does not have enough storage space to do a backup locally so I would like to be able to do an encrypted one remotely via ssh. I guess all I need to figure out is the command to do so

Marek Marczykowski-Górecki

unread,
Sep 10, 2014, 9:03:06 PM9/10/14
to nrg...@gmail.com, qubes...@googlegroups.com
On 10.09.2014 23:23, nrg...@gmail.com wrote:
> I have seen reference to the ability to be able to backup the domains to a remote location using ssh.
>
> My local instance of Qubes does not have enough storage space to do a backup locally so I would like to be able to do an encrypted one remotely via ssh. I guess all I need to figure out is the command to do so

You can enter a command to be run in VM, instead of path. That command will
get the backup content on stdin. Using ssh it could be:
ssh user@host dd of=path-to-store-backup

The command cannot be interactive, so you'll need pubkey authentication set.
As the backup is already encrypted, you can use some not encrypted protocol,
or even simple netcat:
nc some-server some-port
(and on remote server start "nc -l some-port > path-to-store-backup")

--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

signature.asc

Jason M

unread,
Sep 12, 2014, 6:30:37 PM9/12/14
to qubes...@googlegroups.com, nrg...@gmail.com
Thank you,

I got this working now although I had to set up 2 more VMs in order for me to get it working correctly.

I need a VM that was open (that could not be included in backup since it needed to be open) that included the script as indicated in your reply.

I also needed another VM to be able to save netvm, firewallvm and the vn created above since all of those 3 can not be backed up at the same time as everything else since they need to be open for the ssh transfer.

One thing I noticed is dom0 does not seem to backup everything; only user data.  Is there a way to back it up completely?  What about creating a btrfs snapshot?  Reason I want it backed up is since I am new to QubesOS and am installing packages to DOM0 that are needed IMO (like rendering; default font rendering is yuk) as well as custom configuration files for some vm's.

Marek Marczykowski-Górecki

unread,
Sep 12, 2014, 6:58:23 PM9/12/14
to Jason M, qubes...@googlegroups.com
On 13.09.2014 00:30, Jason M wrote:
> Thank you,
>
> I got this working now although I had to set up 2 more VMs in order for me
> to get it working correctly.
>
> I need a VM that was open (that could not be included in backup since it
> needed to be open) that included the script as indicated in your reply.
>
> I also needed another VM to be able to save netvm, firewallvm and the vn
> created above since all of those 3 can not be backed up at the same time as
> everything else since they need to be open for the ssh transfer.

You can simply create special netvm for making backup (I call it "backupvm").

> One thing I noticed is dom0 does not seem to backup everything; only user
> data. Is there a way to back it up completely? What about creating a
> btrfs snapshot? Reason I want it backed up is since I am new to QubesOS
> and am installing packages to DOM0 that are needed IMO (like rendering;
> default font rendering is yuk) as well as custom configuration files for
> some vm's.

Currently it isn't possible. You can create some script to copy those files to
dom0 user home.
signature.asc
Reply all
Reply to author
Forward
0 new messages