I have 2 servers. On one I have esxi 6.0u2 from xsi (c) XSIBACKUP-PRO 9.1.8 on the other I have Debian 9.0 stretch with borg installed. What is the correct way to back up from the first server? Does the borg repository need to be shared by nfs to esxi host?
borg init user@hostname:/path/to/repo
There is no need to add it again, you should be able to connect with XSIBackup to xx without any password.
./xsibackup --backup-prog=borg --backup-point=xx.xx.71.125 --backup-type=custom --backup-vms="Cycki"
The server --backup-point=xx.xx.71.125 does not exist
Make sure there is an SSH server listening on xx.xx.71.125 port and that the firewall allows this connection
Please, read this post thoroughly, it offers all the details:
Deprecated (c)XSIBackup Classic Borg Backup support
If you find something that is obscure, could be explained better or you just don't understand, please let us know and will improve the text.
Roberto, Thank you for your answer. I read this article before asking a question. I wanted to test xsi backup to borg repo.
# ./xsibackup --backup-prog=borg --backup-point=/backups/my-borg-repo --backup-type=custom \
I dont understand backup-point switch. In normal case this is target for my backup but in backup to borg repo this is borg repository name?
This command is wrong:
# ./xsibackup --backup-prog=borg --backup-point=/backups/my-borg-repo --backup-type=custom \ --backup-vms="MyVM1,MyVM2!MyVM2_3.vmdk;MyVM2_4.vmdk"
it should be:
# ./xsibackup --backup-prog=borg --backup-point=10.0.0.1:22:/backups/my-borg-repo --backup-type=custom \ --backup-vms="MyVM1,MyVM2!MyVM2_3.vmdk;MyVM2_4.vmdk"
Borg backups work only over IP (our fault, there's wrong information, we'll correct it now), you must parse the URL of a working and accesible Borg server like 10.0.0.1:22:/path/to/borg/repo
Last edited by roberto (2017-06-28 14:47:04)
We have updated the information here:
Regarding Borg backups, depending on the Linux/ Unix distro you use, you may need to exchange keys manually to enable passwordless communication, although with CentOS, RHEL, Fedora and FreeBSD you can use the --link-srv command to achieve this goal.
It might work with other OSs too, if they pledge to init.d or systemd standards. Key exchange will work with almost any OS that has OpenSSH installed, the weakest point is service restart, but you can fix that with a full reboot.
Last edited by roberto (2017-06-28 15:00:10)
You can use the --on-success and --on-error events to fire a script that prunes the Borg repo via SSH. You should create a file in your XSIBackup installation folder, i.e /vmfs/volumes/datastore1/xsi-dir/prune-borg.sh
Then add something like this to your prune-borg.sh file:
ssh -o StrictHostKeyChecking=no -i /vmfs/volumes/datastore1/xsi-dir/xsibackup_id_rsa email@example.com "borg prune -v --list --dry-run --keep-daily=7 --keep-weekly=4 /path/to/repo"
And call it from the xsibackup-cron file adding this to the Borg backup job:
... --on-success="execProg->003" --on-error="execProg->003"
And on a different line in the xsibackup-cron file add the script execution like this:
(*) Do not remove the # sign at the beggining of the line, it's needed to execute an outer script.
(**) Change paths according to your setup.
Last edited by Daniel (2017-06-28 18:42:49)
Few questions above:
1. How can I use encrypted (with passphrase) borg repo with esxi?
2. I actually testing some nackup errors, and when i plug off cable with cron backup running in background i have error in log:
2017-06-30T05:37:34| Examining borg repo [/backup/esxi_ovh]... Adding queued files to Borg repo [/backup/esxi_ovh]: packet_write_wait: Connection to 79.137.xx.xx: Broken pipe
But mail with raport was not send.
3. Restoring from xsi-pro works perfectly. I have list of my backups and I can choose. But I have a problem with archive name (i think the problem is with spaces in archive name) problem on borg side.
root@backup:~# borg list /backup/esxi_ovh/ -v 1498759850 - nsxxx.ip-137-74-1.eu - iRedMail ::: Thu, 2017-06-29 20:10:51
borg info 1498759850 - nsxxx.ip-137-74-1.eu - iRedMail :::
borg info: error: argument ARCHIVE: "1498759850": No archive specified
I know this is a borg problem, but maybe You have solution.
P.s. In prune-borg.sh must be ssh address, something like:
ssh -o StrictHostKeyChecking=no -i /vmfs/volumes/datastore1/xsi-dir/xsibackup_id_rsa xx.xx.xx.xx "borg prune -v --list --dry-run --keep-daily=7 --keep-weekly=4 /path/to/repo"
Thank You and have a nice day!
You can't parse any password or passphrase from ESXi to Borg, just data