You need to adapt to your requirement.
If you are using VM, you may mount a host directory into the VM, then backup to that directory.
For restore, you need to boot from an linux iso and works out the path, partition.
But the simplest way in VM is just make a snapshot or shutdown for a while and duplicate the VM imagw |