I have been using Gmvault to backup my Gmail email accounts but since the machine I use for doing this job only has 1GB memory, it frequently got killed by the system (Ubuntu) when it exhausted all available memory. But if I restarted it, it would just resume from the point where it got killed.
So I would like to have a command that makes it restart after it got killed. I have tried this way but it didn't work:
for i in {1...999}; do gmvault sync [email protected] -d ./peter123 --resume; done;
When the system killed it, it killed the whole command (whole loop) rather than the current iteration in the loop.
trap
?