The Internet Archive is, and I really want to emphasize this, Fucking Huge. If you want to help archive it, every upload has an associated torrent you can download and help seed. Torrenting itself isn’t illegal, only torrenting illegal stuff like copyrighted movies. You can buy a relatively cheap refurbished HDD of whatever size you want, set up qBittorrent, and torrent the uploads that you want to make sure are available even if the Internet Archive has to take them down or has a critical data loss failure.
In the case of books, Anna’s Archive is looking for help seeding their enormous collection of books and research papers. Consider reading that page and helping them as well!