One way to prepare for a DDoS or other attack is to make regular backups of your site's content so you can restore them or import them into another system in case your web host fails to protect you. It is often a lot of work to restore a backup, but it is better than losing all of your content.
To make a backup of your website on a hosted service, export all of your pages, posts, and comments into a single XML file. It's important to note that this will only back up the text content of your website. Other content, such as images that you've uploaded, will not be included in this backup. The easiest way to make sure you have a backup copy of all of your images is to make a mirror of your site.
To make a backup of your website when you're using shared hosting or administering on your own server, copy all of the files that make up your website and save a snapshot of your website's database.
If you run your own web server, you should set up automatic backups to a remote server. Useful tools include ssh, scp, mysqldump, and crontab. Step-by-step instructions for setting up automatic backups fall outside of the scope of this guide.
There's a certain reliability and convenience of using automated backups and making a mirror of your website somewhere online using unix tools or services like rsync.net or tarsnap (both paid), but should something happen to your service provider, you risk losing those backups. Alternatively, you can back up your site to a drive that's physically with you no matter what happens with your service providers; however, you might have trouble making sure it's kept up to date.
Doing both is great, but be prepared for additional costs, time commitments, and challenges related to maintenance and upkeep.