How to backup virtual server from within itself

I’ve got an Ubuntu VPS and hoster doesn’t offer any backup abilities in management system. Sadly there is some important Libreswan setup I need to preserve and move to another server, though I’m not into this piece of software and don’t know what exactly and how to backup and restore there.

So I need to image the whole system. But from within, while it’s running, or through SSH.
Is there a way to do it?