I am relatively new to working with WordPress, but I am very comfortable with, and prefer to use the command line. I need to backup WordPress before performing a version upgrade. I came across wp-cli and I assume that it is the go-to utility for working with WordPress on the command line.
When working with WordPress, what do I need to back up, and how can I do this from the command line?
Bonus question: how would you go about automating this to perform regular backups?