Let's encrypt certbot symlink error

After restoring a backup, certbot did not want to renew.

Error:

<------------------------------------------------->
cronjob running on Sun Jul  9 02:08:00 BST 2023
Running certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/tbp.land.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Renewal configuration file /etc/letsencrypt/renewal/tbp.land.conf is broken.
The error was: expected /etc/letsencrypt/live/tbp.land/cert.pem to be a symlink
Skipping.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
No renewals were attempted.

Additionally, the following renewal configurations were invalid:
  /etc/letsencrypt/renewal/tbp.land.conf (parsefail)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 renew failure(s), 1 parse failure(s)
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
<------------------------------------------------->

Instead of being symlinks, the files from live/ folder were actual files. The solution is explained in the let’s encrypt forum here: Need help recreating symlinks - #2 by schoen - Help - Let's Encrypt Community Support :

cd /etc/letsencrypt/live/tbp.land

rm cert.pem privkey.pem chain.pem fullchain.pem

ln -s ../../archive/tbp.land/cert7.pem cert.pem
ln -s ../../archive/tbp.land/privkey7.pem privkey.pem
ln -s ../../archive/tbp.land/chain7.pem chain.pem
ln -s ../../archive/tbp.land/fullchain7.pem fullchain.pem

certbot renew