#1 2021-02-26 10:43:24

xvilaro
Member
Registered: 2021-02-24
Posts: 3

Replica XSIBackup-DC versions

I want to create a replica of the virtual machine with different versions. With the program before the DC, I could put the parameter --datedir = yes, it would create the copy folder with the data and I could save several versions limiting the copy space with --backup-room = 400.

How can I do it with the new program?

Offline

#2 2021-03-01 16:31:33

admin
Administrator
Registered: 2017-04-21
Posts: 1,658

Re: Replica XSIBackup-DC versions

./xsibackup --backup "VMs(MYVM)" /vmfs/volumes/backup/myrepo --rotate=10

To keep ten restore points.

(c)XSIBackup-DC full man page

Offline

#3 2021-03-02 11:32:24

xvilaro
Member
Registered: 2021-02-24
Posts: 3

Re: Replica XSIBackup-DC versions

Thank you very much for your answer.

I had already made several versions of backups, but had not seen it. I understand that the snapshot.vmsn are the versions, how can I now recover a previous copy?

PDC-BONDITEX-Snapshot1.vmsn
PDC-BONDITEX-Snapshot2.vmsn
PDC-BONDITEX-Snapshot3.vmsn
PDC-BONDITEX-Snapshot4.vmsn
PDC-BONDITEX-Snapshot5.vmsn
PDC-BONDITEX-Snapshot6.vmsn
PDC-BONDITEX-Snapshot7.vmsn
PDC-BONDITEX-Snapshot8.vmsn
PDC-BONDITEX-flat.vmdk
PDC-BONDITEX.nvram
PDC-BONDITEX.vmdk
PDC-BONDITEX.vmsd
PDC-BONDITEX.vmsd.tmp
PDC-BONDITEX.vmx
PDC-BONDITEX.vmx.tmp
PDC-BONDITEX.vmxf
PDC-BONDITEX.vmx~
vmware-1.log
vmware-2.log
vmware-3.log
vmware-4.log
vmware-5.log
vmware-6.log
vmware-7.log
vmware-8.log
vmware.log
 ./xsibackup --restore /vmfs/volumes/datastore1/backup/PDC-BONDITEX/PDC-BONDITEX-Snapshot2.vmsn /vmfs/volumes/datastore1/restore/

2021-03-02T08:03:20 | Error code 382 at file restore.c, line 382 | Error description: can't find the .xsitools file:
-----------------------------------------------------------------------------------------------------------
Removed host <tmp> dir        OK
-----------------------------------------------------------------------------------------------------------
Removed prog <tmp> dir        OK

Thanks

Offline

#4 2021-03-02 14:32:24

admin
Administrator
Registered: 2017-04-21
Posts: 1,658

Re: Replica XSIBackup-DC versions

Why are you pointing the restore source to a .vmsn file?.
"I understand that the snapshot.vmsn are the versions"

You just left us speechless...

You must point it to the VM you want to restore under a repository, always under a timestamped folder, something like:

 ./xsibackup --restore /vmfs/volumes/backup/20210214140301/PDC-BONDITEX /vmfs/volumes/datastore1/restore/

You don't place backups in the same datastore where you are hosting the VMs

Replicas are just replicas, you don't need to restore them, they are ready to use copies. You can make a series of replicas to be used as full backups if you will. Although that is not a very practical method of doing things, as you are copying all the data everytime:

 ./xsibackup --replica "VMs(PDC-BONDITEX)" /vmfs/volumes/backup/replicas/PDC-BONDITEX/$(date +%Y%m%d%H%M%S)

But above all, please, read the manual and then place concrete questions:
(c)XSIBackup-DC full man page

Guessing is not the best way to achieve good results.

Offline

#5 2021-03-09 13:03:20

xvilaro
Member
Registered: 2021-02-24
Posts: 3

Re: Replica XSIBackup-DC versions

Thank you for your answers

The copies already work correctly and the folders are generated with the dates of when they are made but I cannot automatically delete the previous versions.


I have tried it with the --rotate but as we can see it does not detect it

--rotate option was detected, retrieving backups to prune...
-----------------------------------------------------------------------------------------------------------
ROTATION: set to 5 backup cycles
-----------------------------------------------------------------------------------------------------------
No backups to prune as per rotation number, 1 backups found

these are the saved versions of copies

20210303083353  20210303130746  20210303154603  20210304141231
20210303091752  20210303140104  20210304112020  20210308142448

Could it be that I am missing something?

Thanks a lot

Offline

#6 2021-03-09 14:43:21

admin
Administrator
Registered: 2017-04-21
Posts: 1,658

Re: Replica XSIBackup-DC versions

As we stated in some previous response, you "can" use (c)XSIBackup-DC to produce backups that way. Nonetheless that is not the intended usage of the program and rotating doesn't work with custom solutions like this.

Nonetheless, it is extremely easy to delete folders older than some amount of time following a given pattern by using the find command.

UPDATE:

We probably misunderstood you, so here it goes an answer closer to what we believe you were looking for.
If you use something like the Julian date (%j) and calculate its MOD operator $(date %j) % N, you will be creating a rotating pattern which will repeat itself after N iterations (5 in the below example), thus you will copy each VM fully on each initial iteration and just make it differential on the repeating runs.

You can also optionally use the [=cbt] flag to make the replicas be much faster.

This way you keep a set of ready to use restore points.

/scratch/XSI/XSIBackup-DC/xsibackup \
--replica[=cbt] \
"VMs(VM1,VM2, VM3...)" \
/vmfs/volumes/backup/replica/$(( $(date +%j) % 5 )) \
--use-smtp="1" \
--mail-to=mail-from \
>> /scratch/XSI/XSIBackup-DC/var/log/xsibackup.log 2>&1

Offline

#7 2021-06-11 03:15:43

Mathieu
Member
Registered: 2021-04-20
Posts: 7

Re: Replica XSIBackup-DC versions

xvilaro wrote:

[...]I had already made several versions of backups, but had not seen it. I understand that the snapshot.vmsn are the versions[...]

PDC-BONDITEX-Snapshot1.vmsn
PDC-BONDITEX-Snapshot2.vmsn
PDC-BONDITEX-Snapshot3.vmsn
PDC-BONDITEX-Snapshot4.vmsn
PDC-BONDITEX-Snapshot5.vmsn
PDC-BONDITEX-Snapshot6.vmsn
PDC-BONDITEX-Snapshot7.vmsn
PDC-BONDITEX-Snapshot8.vmsn

Thanks

I would like to rebound on the existence of these vmsn files in the replica folder.

I've noticed these files are created in the VM directory when a snapshot of a VM is created. They are then automatically removed from the VM directory when the snapshot is removed.

I was wondering why (c)XSIBackup-DC copies the VM-SnapshotXXX.vmsn files in the replica directory (and keeps the previous ones) each time the VM is replicated. Are these VM-SnapshotXXX.vmsn files of any use for us ?

Same question with the VM-vss_manifestsXXX.zip files which accumulate in the replica folder when we ask (c)XSIBackup-DC to quiesce the VM before taking the snapshot.

Offline

#8 2021-06-11 15:29:16

admin
Administrator
Registered: 2017-04-21
Posts: 1,658

Re: Replica XSIBackup-DC versions

They are just kept there to know about the history of events. They are useless from a recovery point of view.
You can manually remove them, should you ever use the replica in production.

Offline

#9 2021-06-21 20:55:04

it2.at
Member
Registered: 2021-06-21
Posts: 1

Re: Replica XSIBackup-DC versions

i asume the number of copies of the VM-SnapshotXXX.vmsn files and VM-vss_manifestsXXX.zip files which accumulate in the replica folder, should be monitored and cleaned up from time to time. because of the maximum number of files VMFS can manage in one folder.

Offline

#10 2021-06-22 09:33:49

admin
Administrator
Registered: 2017-04-21
Posts: 1,658

Re: Replica XSIBackup-DC versions

We will dedicate some development time to this in the following days. We are finishing to test new features that will allow you to rotate multiple replicas, as some users prefer to keep ready to use copies even though it may take more time to complete the backups. Nonetheless since we added the multitenant CBT feature, this technique has emerged as some much more feasible way to keep ready to use copies, just as long as you have the necessary space to host them.

Offline

Board footer