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

Forum ©XSIBackup: ©VMWare ©ESXi Backup Software


You are not logged in.

#151 Re: General matters » Segmentation fault with restoring VM over IP » 2022-03-29 10:03:26

Your problem is in the SSH tunnel. Disable any firewalls in between and revise the errors thrown by the SSH layer. Increase verbosity and activate strace:

strace ./xsibackup --restore xsibackup@host:22:/xsibackup/host/20220328165750/VM1 /vmfs/volumes/datastore1/restore --debug-print

We do these type of operations every day on CentOS and Rocky Linux, even on Ubuntu and Debian devices sometimes, although as you know we encourage you to use the former distros.

What is your remote system?, you haven't even told us.

#153 Re: General matters » Segmentation fault with restoring VM over IP » 2022-03-28 17:46:00

Are you using latest version?.
Restore using [b]root[/b] and see if that works.

We recommend that you use CentOS 6/7 or Rocky Linux 8 as your target Linux system. There are hundreds of Linux distros and although most of them share some common principles, we can't guarantee that.

If you use the recommended distros and File Systems (XFS, ext4), you will enjoy the benefit of using some heavy tested scenarios and you will minimize your issues and take maximum advantage of your time.

Your problem broken down into its constituent pieces:

To be able to restore from a remote system you need xsibackup binary present in it. (c)XSIBackup can automatically update your binaries in the remote host, just as long as you use the root user, as the binaries are placed in the /usr/bin folder and you need elevated privileges to do that. You can also install manually but doing it through the regular over IP backup/replica command is much more convenient.

Once the binary is present in the remote system you will be able to use it when running the command with some alternative user, like [b]xsibackup[/b]. Still that user will need to have privileges to create folders inside its home directory /home/xsibackup. You can achieve that by running.

chown -R xsibackup:xsibackup /home/xsibackup/

You have obviously configured your backup server up to this point, as you say that you can indeed backup without issue using the [b]xsibackup[/b] user.

Restoring from the remote folder using the non-privileged user should be rather straight from this point. Just make sure that you are using the latest binary.

#154 Re: General matters » XSIBackup Free 100 GB limit error for 50 GB VM » 2022-03-28 17:27:12

Check the VM layout and the VM folders, you may have garbage files taking space.

#155 Re: General matters » Retention settings » 2022-03-28 08:25:44

Thank you, your code snippet will for sure be useful to others. Just reminding you all, use with caution and test thoroughly.

#156 Re: General matters » How to exclude VM's rather then include » 2022-03-26 11:46:03

Thank you for your snippet, I'm sure others will find it valuable.

(c)XSIBackup Classic has been deprecated and is no longer maintained, nonetheless it's flexible enough to allow solutions like yours when it comes to exclude VMs.

I will quote Mr. Miyagi once more (or was it Spiderman) to say: "with great power comes great responsability".

The most flexible program is an empty .c file where you type some C Language sentences.  The most inflexible program is a plain button that you push and all that you want is magically done as a pre-stablished set of hardcoded routines.

(c)XSIBackup Classic is somewhere in between. It is inflexible enough to not make users have the feeling that they have to program their own backup script, yet flexible enough to allow them to fulfill almost anything related to backing up their VMs quite rapidly, as your example demonstrates.

#157 Re: General matters » Retention settings » 2022-03-26 11:31:07

CBT support is exclusive to DC version, still regular differential replica will be almost as fast for VMs under 50 GB.

#158 Re: Repositories » Repo on VMFS6 and block size related to file system capacity. » 2022-03-25 13:10:18

Just an update for anybody reading this.
If you have no other choice, namely: you "really" do not have any other choice than using some VMFS file system to store your deduplicated backups.
(This is literally impossible, as you always can use some VM on top of VMFS and share it via NFS or IP).

So, for the above statement: "NO OTHER CHOICE" to be plausible you would need to be in a hurry and not have time or the knowledge to devise a proper solution, or be pointed at with some gun by some furious guy that wants you to do things wrongly.

If any of the above premises is true and you will still use some VMFS file system against our recommendation and all logic, at least use a big block size of 50MB (--block-size=50M) to minimize the effect of a slow FS and eventually a limited inode number in VMFS-5

#159 Re: General matters » Retention settings » 2022-03-25 11:57:48

Remember to use [b]xsibackup --prune /path/to/repository/20220325002123[/b] to remove restore points inside a repository. You can on the other side remove replicas by just removing the folder. Some people like to [url=https://33hops.com/xsibackup-rotating-replicas.html]rotate small groups of replicas[/url] when the total size of their VM set is not very big. If you add --replica=cbt, the update of each replica will be almost instant from the second run in each replica point.

#160 Re: General matters » Retention settings » 2022-03-24 20:27:47

We got it. The short answer is no sad
The rotation mechanism allows you to keep a number or days of restore points, yet it can't maintain such complex scheme.
You can on the other side script it on your own and run the script at the end of every backup.

#161 Re: General matters » does it save the disks thin or thick » 2022-03-24 15:51:36

(c)XSIBackup Classic will always create thin or sparse disks, if the underlying FS supports this type of file. It wouldn't make sense to do it other way, as you can easily turn any thin disk into a thick provissioned one and you want a backup program to take advantage of space as much as possible.

#162 Re: General matters » 'Preparing to execute job'...forever » 2022-03-21 16:57:56

We just had the same issue posted today by another user.
For some reason some [b]date[/b] command (c)ESXi implementations lack the %j (Julian day) modifier, you can easily work that around by using a Unix time stamp %s

./xsibackup --replica=cbt "VMs(vmname)" "root@192.168.1.1:22:/vmdks/replicas/$(( $(date +%s)/86400%7 ))"

#163 Re: General matters » arithmetic syntax error » 2022-03-21 08:29:50

Some [b]date[/b] binaries in some (c)ESXi builds lack the [b]%j[/b] (Julian day) modifier (why is a conumdrum to us). Try this instead:

./xsibackup --replica=cbt "VMs(vmname)" "root@192.168.1.1:22:/vmdks/replicas/$(( $(date +%s)/86400%5 ))"

#164 Re: General matters » 'Preparing to execute job'...forever » 2022-03-19 14:15:25

We don't know what your job is, we can only offer you general hints.

The GUI is just a wrapping layer for convenience. Do not pretend to get any vital information from it.
Use the command line to debug your scenario:

./xsibackup --backup "VMs(YOUR-VM)" /vmfs/volumes/backup/your-backup-repository

You will get the output on screen along with any eventual errors.

#165 Re: General matters » ssh_dispatch_run_fatal connection to port 22: invalid argument » 2022-03-19 14:05:55

It just doesn't work that way.
We do not state anywhere that the software works that way (pulling VMs from one remote server to the local one). It works right the opposite way, you push VMs from the server where they are to a target server.

Please read the manual and examples, run some simple jobs to try the software out and then add more arguments as you learn to use the software.

Using (c)XSIBackup is very straight when you keep things under some fair degree of control. That means migrating VMs between hosts that keep some minimum level of uniformity: compatible SSH versions, compatible hardware versions and also compatible VMFS versions.

There are many different builds even under the same version number, not only those released by (c)VMWare but also from many manufacturers: DELL, HP, Fujitsu, etc...

Pushing VMs from 5.5 to 7.0 should be straight most of the times, still if your environment requires it, you may need to enable some deprecated cipher in the sshd_config file of the target system, disable FIPS, open ports in between the servers, etc.... There is no way you can escape from learning how OpenSSH works once you cross some given threshold of complexity.

#166 Re: General matters » download free or free classic » 2022-03-18 20:08:54

Free Classic is the old edition of our software, while plain Free is the latest edition.

Classic is based on scripts while the current edition is the same concept although radically different in design, as latest (c)XSIBackup is programmed in pure C + Assembly and offers features that Classic version was far from having: compatibility with ESXi 7.0, differential backup, CBT or Granular Restores are some of them.

If you just want something that allows you to copy your VMs in some (c)ESXi version below 7.0 -as they are- to some local datastore then Classic version will do it without size limits.

#167 Re: General matters » ssh_dispatch_run_fatal connection to port 22: invalid argument » 2022-03-18 10:40:50

First of all you have to take some things into account:

Make sure that you have indeed enabled the SSHOut rule in your (c)ESXi firewall, not only SSHIn.

The OpenSSH versions in your two (c)ESXi boxes differ too much.
As new OpenSSH versions are released, the KEX algorithms and Ciphers are deprecated and new ones are added. Thus, it's likely that two OpenSSH implementations that are too distant in time can't agree on some KEX or Cipher.
You can try to solve the above mentioned situation by re-enabling some deprecated algorithm in your newest (c)ESXi box, should that be possible, as (c)ESXi's OpenSSH implementations are customized and may not allow to re-enable some older algorithms, contrary to regular OpenSSH releases.

Nonetheless, in your case you aren't even getting to that point. [b]Your problem is related to having FIPS active in the (c)ESXi 7 box while your 5.5 box does not even support this feature[/b]. This is a common error when connecting from FIPS to non FIPS OpenSSH servers.

Now the thing is: how to disable FIPS in the target server. Is that even possible?

In (c)ESXi 6.7.0 and above:

1/ To find whether FIPS is enabled or not.

esxcli system security fips140 ssh get

2/ To disable FIPS

esxcli system security fips140 ssh set --enable=false

(*)FIPS is a security feature. You may very well disable it to facilitate a migration, you should not disable it permanently though.

Migrating VMs from 5.5 => 7.0 is possible by using the workaround above, although you may need to tweak some other things depending on your exact (c)ESXi version and build.

Doing it the other way around 7.0 => 5.5 could be a real pain if possible at all.

In your post you say that you are migrating VMs 5.5 => 7.0, you then talk about not being able to connect from 7.0 => 5.5. Is that an error in your description?, or there is something we are missing.

UPDATE:
New (c)XSIBackup-App appliance runs on CentOS 7 which is a full fledged Linux OS. Thus it will allow you enable any deprecated algorithm in OpenSSH as well as install any software that you may need. It's a much more flexible tool, as it doesn't run in the (c)ESXi OS and is not constrained by its limitations and cut down features. Download at Sourceforge.net: [url]https://sourceforge.net/projects/xsibackup-app/[/url]

#168 Re: General matters » Sorting progress error when repairing » 2022-03-17 11:39:01

If you interrupt a backup via Ctrl+C you will have a partially written backup repository. If you do so on the first backup attempt, you will most likely not even get to have a .blocklog file that you can repair.

Repairing a repo basically consists in accounting for all existing blocks and making sure that the .blocklog manifest file includes them all, so that when you run some posterior backup you can take advantage of that seeded blocks and you don't have to copy them again. Still, having to run --repair is a last resource action. You shouldn't need to do so. And if that was the case, you could only trust backups made after running that command.

It will always be more reasonable to just re-sync all data that to run --repair, as you will make sure all your data is consistent and you are not wasting storage space will old stall blocks. Only if you have a relatively narrowband link and resyncing is not possible you should choose --repair over creating a new repo.

There are different versions of the [b]sort[/b] binary, which is still a dependency to some analysis arguments like --repair (we'll remove those dependencies in the next versions). Not all of them incorporate the -T argument. You may be using a Linux distro that has a non compatible sort binary.

Should that be the case, you will find a sort compatible binary inside the /bin folder in the installation root. That binary should be widely compatible with most Linux distros, thus you can simply replace your native sort implementation by the one in the /bin folder.

We recommend that you use CentOS 7/8 and Rocky Linux 8 (the latter preferably over CentOS 8). You can off course use any distro that you want, still if you follow our advice you will save some time in solving problems that we have already solved for you.

#170 Re: General matters » backup a domain controller » 2022-03-10 11:38:28

The goal of that line in the procedure is to set AD off and then back on once the snapshot has been finally taken.

Active Directory Domain Services usually appears as [b]NTDS[/b] in the Services applet, that may vary depending on your setup and customization level.
Most of the times you will issue:

net stop NTDS
net start NTDS

Please, note that this is a straight solution that will turn your AD service off during a couple of seconds. VSS services in your DC should take care to hold NTDS writes while the snapshot is being taken just as long as VMWare Tools are correctly installed and configured. The checklist that works for most of our users is:

Virtual Disk service is started and startup type is Automatic.
VMware snapshot provider service is stopped and disabled.
VMware Tools services are running.
Ensure that Volume Shadow Copy service start up type is Automatic

We can't obviously guarantee that your MS Server DC will behave as you expect it to, that will depend on so many other things, that's why we offer this straight procedure that should work in every case.

#171 Re: General matters » --rotate with backup over IP » 2022-03-10 10:54:53

Yes, you can replicate anywhere you want, since you can replicate to any remote FS over IP/SSH.

Please, let us politely insist that what you are planning to do makes no sense at all from a disaster recovery perspective. Independently of whether you will switch the VM on or not, that is irrelevant. In fact it is very recommendable to switch the remote VM on from time to time to make sure that your replica is indeed working, our replica algorithm allows you to do so while still preserving the replica consistency.

Any problem in the original VM will be almost immediately transmitted to your replica. Let's say that you are affected by some ransomware?, what would you do to recover your data?

#172 Re: General matters » --rotate with backup over IP » 2022-03-09 12:26:53

We aren't really understanding you. What you are describing is a replica, not a backup with rotation.

If you backup a VM and keep just one restore point, that is the same as having a single replica, still you will be taking a lot of time to backup your data when compared to replicate and you won't have the advantage of a replica, which is immediate readyness to be switched on.

To keep just an image of a VM over IP run:

./xsibackup --replica "VMs(YOUR_VM)" root@a.b.c.d:22:/vmfs/volumes/datastore1

You should understand that that won't offer you any level of protection unless you accomplish some aditional job on the replica. Shoul you be infected by some ransomware per instance, your replica will be almost immediately affected and your recovery options will be zero.

#173 Re: Repositories » Repo on VMFS6 and block size related to file system capacity. » 2022-03-09 12:17:01

With the Classic version it was a different thing, as it used a bigger block size.
There are two main concerns when using some FS to store deduplicated content in the FS as a database:

- The FS must be fast
- The FS must be able to handle the data

VMFS is slow, as it was not designed to handle millions of small files, but on the contrary to handle a few big files: the virtual disks.

VMFS is terribly slow when it comes to handle many small files, although VMFS-6 is indeed able to handle millions of files, it is very slow. On the other hand, apart from also being slow, VMFS-5 has an inode limit of aproximately 130.000 files and folders. When it reaches that limit it just blows up.

When using (c)XSIBackup Classic to accumulate data in old XSITools 1.0 repositories all these problems are minimized: first of all cause you are using a big block size (50MB), which reduces the effect of data access slowness by a factor of 50. Also the VMFS-5 inode limit is relative, as 100.000 inodes can store 5.0TB of real data, which may in turn host 15-30 TB in VMs.

(c)XSIBackup-DC is more optimized for speed and data compression. Classic version is a toy when compared to it. It uses a 1MB default block size, which you shouldn't change and which yields awesome compression figures, apart from offering CBT compatibility and a lot of extra features when compared to Classic version.

Still, it uses a block size which is 50 times smaller and this will make VMFS slow behaviour to become obvious and be much slower than expected processing data. In regards to VMFS-5, don't even try to use it for obvious reasons. Just 100GB of real data will make it stop responding.

#174 Re: Repositories » Repo on VMFS6 and block size related to file system capacity. » 2022-03-08 11:22:42

Don't use VMFS volumes to store deduplicated repositories (*), that is suicidal.
Use XFS or ext4 on NFS volumes or over IP directly to any Linux server.
Do not use big block sizes unless you have no other choice, 99% of the times there is no justification to do so.
You can't change the block size of a repo once you have created it, why would you want to do so?

(*) Please, note that you can replicate data to a VMFS volume without problems, as replicas are just a set of a few files.

#175 Re: General matters » backup a domain controller » 2022-03-07 10:37:41

Thank you for your feedback.

This is yet another issue having to do with quiescing your FS. We are writing about this all the time, still we have recently updated the main post relative to this topic and [url=https://33hops.com/esxi-snapshot-errors-and-solutions.html#quiescing-notes]added some specific notes[/url].

Every user should try to make the effort to see this kind of problems as a broad issue, even though each particular situation should require a slightly different procedure to solve it.

Of course your proposed solution will always work, as you are shutting your server down before taking the backup snapshot. Even though it is immediately switched on after taking it, the snapshot is indeed taken from a stopped state of the VM, thus the possibilities that your Active Directory DB gets corrupted are zero.

If you can afford to stop the VM for some seconds, a warm backup is definitely the simplest solution to this kind of problems. Still, not everybody can afford to stop the DC to backup the AD VMs.

[b]Problem description[/b]

AD information is kept in a DB. That DB could become corrupt, just like any other DB server which is abruptly stopped. The snapshot issue is about the same as a sudden power outage, which before virtualization became popular was the most frequent way to corrupt the AD database.

The mere fact that it does indeed become corrupt is random and proportional to how busy it is. You might be lucky and the service might be iddle just when you take your snapshot, you should not count on that though.

The DB becoming corrupt does not mean that the whole database goes corrupt. People tend to think in maximalistic terms all the time, which causes terror, doubt and in the end wrong decisions.

Databases become corrupt on power outages or non-quiesced snapshots just because the last pages that are being written get chopped before the end of the page is written to disk. Thus, the system preprocessing routines detect this unfinished write because some page in the DB lacks a footer or closing structure.

Fixing the problem consists in the same conceptual thing in every case: detecting the wrong pages and removing them, which is usually done with the database repair commands. This obviously varies depending on the DB system. In case of a DB server like MySQL or MS SQL Server, you would just loose the last writes or updates. In case of AD, the repairing would chop off the latest AD related operations.

Active Directory adds an additional problem, which is that the DC controller is dependent on the healthyness of the Active Directory DB to boot up. This could be considered an OS design flaw, as it puts you in a technical paradox. The solutions proposed by Microsoft don't seem to work in your case, still, there should be a fairly easy way to fix that DB, as said, this is an old issue which has mature fixing procedures since many years ago, as stated, power outages were a common source of AD relates corruption problems before they were replaced in frequency by virtualization snapshots.

[b]Quiescing backups[/b]

All this kind of issues are prevented the same way: quiescing the FS before actually taking the snapshot. It consists in about the same as a controlled shutdown for DB services, still done with the OS running and resuming normal operations ASAP. It usually takes some seconds at most to quiesce the different DB services in a server.

In the [url=https://33hops.com/esxi-snapshot-errors-and-solutions.html#quiescing-notes]notes on quiescing[/url] we describe the procedure to follow in case of DB services in Windows servers.

There are a few services related to quiescing a Windows guest: VSS, VMWare Tools, Virtual Disk and in some cases some additional helper services. Just as long as those services are configured as described in our post and all other related services are installed and configured properly, using a quiesced snapshot should prevent any corruption on the different DB services that may be running in your guest.

Quiescing in a nutshell consists in the (c)ESXi server communicating a snaphot is about to be taken to the VMWare Tools service in the guest, then the VMWare Service should coordinate the controlled pause of the running DB services.

Still, if you have some host that is not responding to automatic quiescing. You can control the process on your own, how?:

(c)VMWare Tools offer a way to run custom pre and post backup scripts, like described in the post. This scripts can handle three events related to snapshots: pre-FREEZE, THAW and FREEZEFAIL.

FREEZE happens right before the snapshot is taken, THAW happens right after the snapshot has been created (please, note that some documents on the web wrongly describe THAW as happening when the snapshot is deleted), finally FREEZEFAIL is run in the event that some error is triggered.

Controlling your AD services quiescing on your own would consist in adding the necessary AD Service stop command to FREEZE and AD Service start command to THAW, as well as to FREEZEFAIL. That way you make sure that before your backup snapshot is taken the AD Service is stopped gracefully preventing any data corruption and that once the snapshot has been completed it is started again.

It is conceptually the same as running a "warm" backups, still, you make sure that you don't have to reboot the server. It is indeed the same that the coordinated services in the server should do when they are configured the right way.

@echo off
if "%~1" == "" goto USAGE
if %1 == freeze goto FREEZE
if %1 == freezeFail goto FREEZEFAIL
if %1 == thaw goto THAW
:USAGE
echo "Usage: %~nx0 [ freeze | freezeFail | thaw ]"
goto END
:FREEZE
net stop YOUR_AD_INSTANCE_NAME
goto END
:FREEZEFAIL
net start YOUR_AD_INSTANCE_NAME
goto END
:THAW
net start YOUR_AD_INSTANCE_NAME
goto END
:END

Board footer