How to restore all processes on the remote machine?

I am running LXD on an AWS node. It is started using bash script, which also starts another bash script inside it. Now, I am also copying this container using lxc copy --refresh on a remote machine, another AWS node. Now, when I restart the copied container, it does not restart from where the process left off. Also, taking stateful snapshots does not help. Any help in this regard shall be helpful. Thanks.