This question already has an answer here:

I am running a huge base backup to a cloud server that will take a few days to complete. When it is running it takes most of my internet connection. It is running in a terminal, so I can manually satop it with Ctrl-Z and then restart it again.

I wonder, would it be possible to suspend and restart it automatically using cron and send some kill commands or using some other kind of process control at fixed time of the day?

The backup is being done using a python script - jotta-scanner https://github.com/havardgulldahl/jottalib

(And yes, I know that if I suspend the process it will take longer time before the backup is finished, but that is the only way to do it)

marked as duplicate by Kusalananda, Michael Homer, countermode, Anthon, Dmitry Grigoryev Jan 23 '17 at 8:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    How does your backup system know how to resume the session whenever you restart the job, since the job itself doesn't even know it to proceed more intelligently? I think the only way it can work, if it does, implies a lot of repetition which you probably don't realize. All that said, you can send your process SIGSTOP and SIGCONT from a script if you want with kill. – Julie Pelletier Jan 21 '17 at 15:35
  • 1
    For the reason mentioned above, you should validate your data integrity once it completes as I would not be surprised if you have inconsistencies. – Julie Pelletier Jan 21 '17 at 15:38