Last updated on Monday 28th of February 2022 08:52:48 PM

©VMWare Backup - ©XSIBackup Classic : pid management

 Please note that this post is relative to old deprecated software ©XSIBackup-Classic. Some facts herein contained may still be applicable to more recent versions though.

For new instalations please use new ©XSIBackup which is far more advanced than ©XSIBackup-Classic.

Most ©XSIBackup Classic users do like the concept, and after a couple of years dedicating a significant amount of time to develop and improve ©XSIBackup Classic , we believe we have some really stable and resilient piece of code.

Since last versions, when you run a job locally or remotely, ©XSIBackup Classic kills all PIDs that are not that very same instance (which will in turn spawn a number of child subprocesses during the backup job). This has led to removing part of the original ©XSIBackup Classic conceptual flexibility in sake of simplifying PID management.

Users that run relatively simple backup topologies probably liked that turn, but other users willing to create more complex topologies probably didn't like it so much. We have now focused in developing a robust and, at the same time, flexible pid management subsystem, so that you can run simple jobs without having to worry much about cleaning idle processes manually, but can at the same time run remote jobs that will be respected by newer execution requests while they are still running.

©XSIBackup Classic process types:

• user: this is the type of process created by a manual operation in the shell, namely: typing or pasting a backup command and hitting enter, or using the --run-backup command.
• cron: this type is launched from the xsibackup-cron file without any user intervention.
• remote: if backup job is launched from a different host, this type is registered in the xsibackup-pid file.
• sshpipe: when a remote job is launched by using the --host argument, this type of process is registered at the originating server. It belongs to the SSH pipe through which the output of the remote job is being received.

©XSIBackup Classic 's PID management consists on the following:

1 - PID Cleanup: whenever you launch ©XSIBackup Classic manually or from the crontab (xsibackup-cron) the pid_cleanup function is launched. This function reads the xsibackup-pid file and removes all non-running procs. If after doing so, the file is empty, the xsibackup-pid file itself is removed.

2 - Killing of idle processes: this phase consists in collecting the PIDs of all xsibackup, xsibackup-rsync and xsidiff related binaries loaded into memory. This is done before the current process spawns any new child process of the current backup job being executed. Some of those PIDs are excluded from this list: current running process' PID, vi open xsibackup files (this is something for our convenience, and maybe yours, when developing or debugging) and all processes in the xsibackup-pid file except user processes (cron, remote and sshpipe). ©XSIBackup Classic then kills all related processes which are not in the exclude list, namely: Rsync, user type and idle processes. This clearly means that any running user process will be killed by any newer user process launched in the shell.

3 - Shutdown: once the current ©XSIBackup Classic job execution gets to its end, a special function is called (xsib_shutdown). This function reads the xsibackup-pid file and removes the current process and any other process in the xsibackup-pid file, which is not currently running.

Daniel J. García Fidalgo