The r key sits right next to e, and a typo in `crontab -e` wipes the whole crontab with no prompt.
crontab -l > ~/crontab.backup
crontab -ri
crontab ~/crontab.backup # restore
crontab -l prints the current table, so the first line is a one-second backup. -i changes -r into a version that asks for y or Y before it deletes, which is a good habit to alias. Installing a file with crontab file replaces the table in one go, which is also how you restore. The -i option exists in the Debian and Ubuntu cron, but not every cron implementation has it. Keep the real crontab in a git repository and install it from there if you want a history.
Further reading: crontab(1) manual page
Going deeper: Guide: find out why a Linux service failed, with journalctl