©XSIBackup-Free: Free Backup Software for ©VMWare ©ESXi

Forum ©XSIBackup: ©VMWare ©ESXi Backup Software


You are not logged in.

#1 2017-06-28 07:28:50

matz
Member
Registered: 2017-06-28
Posts: 29

Borg Backup

Hello.

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?

Debian:

borg init user@hostname:/path/to/repo

ESXi

./xsibackup --link-srv=xx.xx.xx.xx

There is no need to add it again, you should be able to connect with XSIBackup to xx without any password.
Killed
[root@ns3053729:/vmfs/volumes/584c6a32-61ab2f12-723f-a4bf01080fde/xsi-dir]

next:

./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

Offline

#2 2017-06-28 11:56:58

roberto
Moderator
Registered: 2017-04-22
Posts: 49

Re: Borg Backup

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.

Offline

#3 2017-06-28 14:40:33

matz
Member
Registered: 2017-06-28
Posts: 29

Re: Borg Backup

Roberto, Thank you for your answer. I read this article before asking a question. I wanted to test xsi backup to borg repo.
In example:

# ./xsibackup --backup-prog=borg --backup-point=/backups/my-borg-repo --backup-type=custom \
--backup-vms="MyVM1,MyVM2!MyVM2_3.vmdk;MyVM2_4.vmdk"

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?

Offline

#4 2017-06-28 14:46:26

roberto
Moderator
Registered: 2017-04-22
Posts: 49

Re: Borg Backup

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)

Offline

#5 2017-06-28 14:56:35

matz
Member
Registered: 2017-06-28
Posts: 29

Re: Borg Backup

Uff wink

Thank You!

Offline

#6 2017-06-28 14:57:01

roberto
Moderator
Registered: 2017-04-22
Posts: 49

Re: Borg Backup

We have updated the information here:

Deprecated (c)XSIBackup Borg support

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)

Offline

#7 2017-06-28 17:27:40

matz
Member
Registered: 2017-06-28
Posts: 29

Re: Borg Backup

Ok, its working!

But how I can configure backup retention or what is default backup retention policy?
Normal borg client have borg prune command.

Brog backup pruning

And what is restore procedure from borg repo? (i found it in docs)

(c)XSIBackup Borg restore

Last edited by matz (2017-06-28 17:46:34)

Offline

#8 2017-06-28 18:31:55

Daniel
Guest

Re: Borg Backup

Hello Matz:

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 root@10.0.0.1 "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:

#/vmfs/volumes/datastore1/xsi-dir/prune-borg.sh execprog=003

(*) 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)

#9 2017-06-30 07:29:02

matz
Member
Registered: 2017-06-28
Posts: 29

Re: Borg Backup

Hello!

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

And then:

 borg info 1498759850 - nsxxx.ip-137-74-1.eu - iRedMail :::

I have:

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!
Regards. Damian.

Offline

#10 2017-07-03 11:47:18

Daniel
Guest

Re: Borg Backup

You can't parse any password or passphrase from ESXi to Borg, just data

Board footer