With other distros that I run (WIN10, Ubuntu, Debian) as well as QUBES - I make full disk images using CLONEZILLA and retain them on a spare PC, running as a local server.
All full disk restores work fine, including QUBES OS - which is now my primary system.
Ideally I'd like to be able to have access to individual files within the image copies(if needed).
For DEBIAN, Ubuntu and I assume WIN10(though not really bothered about that) I can go into terminal on my backup PC and key something along the lines of
sudo cat /dir-to-images/sdb1.ext4-ptcl-img.gz.* | sudo gzip -d -c | sudo partclone.ext4 -C -r -W -s - -O /dir-to-new-image/hda1.img
where all the key files take the form sdb1.ext4-ptcl-img.gz.*
with * being aa,ab,ac etc.
As long as I've created a restore file first (eg hda1.img in the above example) the above code works fine - and if I mount the hda1.img file, then all my folders and files are accessible.
I can then recover say an individual file without having to do full disk restore etc.
IS THIS POSSIBLE WITH QUBES?
The relevant files take the form sdc1.ext4-ptcl-img.gz.aa (a single file) and lots of files of the form sdc2.dd-img.aa, sdc2.dd-img.ab through to sdc2.dd-img.bd.
The above instruction works with the sdc1 file and opens up various system files - but I can't do anything to read the sdc2 series of files.
Am not sure what to expect if I could get it to work since each VM has its own DOCUMENTS, DOWNLOAD folders etc.
Is what I want to achieve possible and if so - grateful for any suggestions as to relevant code needed.
If not - any suggestions about a different approach to a simple "system" backup with access to individual files as needed?
I'm not sure about extracting from the backup (it's probably possible), but you can do something else though.
The concern is full restore, right?
How familiar are you with the qvm-backup/qvm-backup-restore exclusion or inclusion methods? I.e. only backup or restore a single or handful of AppVM's without the rest of the system, etc.
Also are you familiar with qvm-backup/qvm-backup-restore profiles?
I know it's still overkill to restore a full AppVM, having to delete it all again after extracting the specific file(s), but if you're not doing this already, atleast this can get you halfway there.
For example if you have a work AppVM, you can make a profile for it and do frequent backups of just that one AppVM and nothing else, then it'll go pretty fast too in encryption/decryption, compared to a full system procedure.
It's not perfect, but maybe it's something?
Apologies, missed your post donoban. But looping the backup seems interesting, I suppose it must be possible with the decryption too.
For info - have used Debian for around 10 years till I swapped to Qubes around 1 year ago. Windows before that. I use CLONEZILLA as it gives easy backup/restore for my old (Occasional use Os's) + QUBES + my wife's UBUNTU.
In extreme case of needing an individual old file (NOT NEEDED YET) - I could restore an old IMAGE to a spare HDD on chosen PC and then copy it from there. Not elegant but it would work.
Am retired and just experimenting the other day for general education - to see if I could get an individual file from an old image copy. As per above - no problem on non-QUBES. (TO answer one point above - I did restore full disk image to hda1.img and could then access all files - this was no real effort - enter an instruction, wait a couple of minutes and its all there).
Ideally for me there would be something simple for me with QUBES.
Have no problem backing up VM's to separate HDD on main PC and copying back as needed - this may be the way forward for me - but I'd still do the CLONEZILLA (BACKUP EVERYTHING) approach as I get a complete system if say my SSD fails.
Backing up everything and then being able to select an odd file if ever needed just seems a simpler concept to me!
My preference is to have "BACKUP" even of VM's on separate PC (as per my CLONEZILLA images) but though one can apparently use SSH to send files through to separate SERVER PC, I haven't yet managed to get this work - I'm OK when using SSH to copy from EG my DEBIAN system to SERVER - but the "right" SSH instruction within the QUBES BACKUP PROCESS seems to be eluding me!
The restore /var/lib/qubes and loopback approach may be a bit beyond me. Can see the relevant files for my live system but not sure about the data within my clonezilla image.
If this is feasible from CLONEZILLA image stored on separate internal server, I might see if I can try and understand it - will have a look another day. Think I'll go hill-walking tomorrow!
Thanks again for all comments.
Have used rsync before from Debian PC to server PC - but again not sure how to apply within constraint of a VM backup process.
I'll have a play - after my day on the hills tomorrow.
Cheers
Thanks for the instructions. I'm trying to get borg working in qubes 4.0, as you describe.
If I understand correctly the idea is to pass borg to qvm-backup as a command. Looking into qvm-backup I see there is no option anymore to do unencrypted backups. So the output sent into the borg command will be already encrypted. If the backups are encrypted before arriving to borg I'm wondering how do you get any deltas calculated (encrypted data should be different from one run to the next one even if the original data is the same).
Is there any hidden way to force qvm-backup into do it unencrypted? (so I can rely on borg to encrypt the backups) or how do you do it in qubes 4.0?
meskio