To the best of my understanding, all linux process are actually files, is it possible to copy a running process from one machine to another?

for example - copy a running tomcat server from one machine to another without having to restart the server

  • You would need clustering software. I am not knowledge able about names, or what each one does, but am aware that there is one for teleporting processes to other machines. Commented Jan 9, 2017 at 14:27
  • Not actually files. Files are not nature. States of devices are nature, and they're exposed to userspace by the OS as the form of files Commented Jul 31, 2019 at 23:24
  • More specifically, processes are actually the least file-ish thing on linux, unlike other states of linux. You can't hold an fd to a process and assume the process exist, that's FreeBSD's pdfork functionality, which doesn't exist on linux. Commented Jul 31, 2019 at 23:29

4 Answers 4


To the best of my understanding, all linux process are actually files

You shouldn't take the metaphor too literally. Linux processes can indeed be accessed through a pseudo file system for debugging, monitoring and analysis purpose but processes are more than just these files and "copying" them from a source host /proc file system to a target /proc file system is doomed.

Is possible to copy a running process between machines?

One of the serious issues moving a running process between hosts is how to handle the open file descriptors this process is using. If a process is reading or writing a file, this very file (or an exact clone) must be available on the target host. File descriptors related to sockets would be tricky to process as the IP address they are bound to will likely change from one host to the other. Processes sharing memory segments with other ones would cease to do it after a migration. PID clashes might also happen, if a running process has the same pid that the incoming one, one of them will need to be changed. Parent child relationship will be lost, and I have just scratched the potential problems.

Despite these issues, there are technical solutions providing that functionality called "Application checkpointing" like DMTCP and CRIU. This is similar to what is used with hypervisors like VMWare, VirtualBox, Oracle VM and others when they do virtual machines live migration / teleportation. With virtual machines, the job is actually "simpler" as the whole OS is moved, including the files descriptors, the file systems, the memory, the network and other devices, etc.

  • I actually asked this question more as an exercise than as something to be tried on a real system. Looking into process "files" I found that a process has too many dependencies to just copy a file and make it work on another machine but it never hurts to ask and possibly get another view into things. thanks for your answer.
    – aviad m
    Commented Jan 10, 2017 at 7:17
  • what about docker? . edit found this criu.org/Docker
    – phil294
    Commented Dec 5, 2017 at 23:50
  • @Blauhirn Indeed. I mentioned CRIU with a link where integration with OpenVZ, LXC/LXD, and Docker are mentioned.
    – jlliagre
    Commented Dec 6, 2017 at 0:24

Yes, it's possible. MOSIX (http://www.mosix.org) does process migration between linux machines (as mentioned in wikipedia link in @jlliagre answer), is open source and doesn't require kernel patch. It's for HPC applications and probably not what you want, but thought I'd mention for posterity.


No, it's not possible to move a process (i.e., a running program) from one Unix machine to another.

Some services, such as web services, database services or routers, provide redundancy options, such as failover and/or load-balancing. This means that you have several copies of the service running on several machines, and if one goes down another takes over, or they share the load of providing the service, possibly replicating databases/state between each other to keep up to date.

These kinds of services would "move" from one machine to another, while the processes that are providing the service are not moving.

This is a feature of the specific service, however, and not of Unix.

You may find more information on the ServerFault forum.


No, as of now its not possible. when process comes under a service. Then service to service process transfer can be possible. But this required OS level changes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .