Automatic backup to MEGA cloud with crontab

Backing up stuff to the cloud is all the rage, and I wanted to give it a try. Since I don’t really want to spend any money on it, I decided to go with the best free provider I could find. I haven’t done too much research, but MEGA’s 50 free GB seems to be the best offer around. They also have a simple CLI tool called megatools (manual). Since I couldn’t find megatools in the official debian repo, I decided to use it from docker. There is no official docker container either, so I just grabbed one at the top (tomzo/megatools-docker). He has added two scripts of his own, which may be helpful if you want to see how megatools work (github), but I feel they are too clunky to use. ...