Registered users
Linkedin Twitter Facebook Google+
  This website uses its own cookies or from third parties Close
33HOPS, IT Consultants
33HOPS ::: Proveedores de Soluciones Informáticas :: Madrid :+34 91 663 6085Avda. Castilla la Mancha, 95 - local posterior - 28700 S.S. de los Reyes - MADRID33HOPS, Sistemas de Informacion y Redes, S.L.Info

<< Return to index

VMWare Backup - XSIBackup: pid management

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

Since last versions, when you run a job locally or remotely, XSIBackup 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 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 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's PID management consists on the following:

1 - PID Cleanup: whenever you launch XSIBackup 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 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 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



Website Map
Consultancy
IT Manager
In Site
Resources & help
Index of Docs
33HOPS Forum

Fill in to download
The download link will be sent to your e-mail.
Name
Lastname
E-mail


            Read our Privacy Policy