Originally Posted by
r415
There are in fact certain California municipalities where hotels are required to keep a full copy of your ID by law (the entering into their computer part is probably just how they store the records, though, as opposed to a requirement of law). Hotels can (and have) faced fines and other sanctions for failure to comply.
And there is a California state law (which would trump local law) that prohibits copying of drivers licence information down in conjunction with a credit card transaction. So as long as you use a credit card and don't pay cash, this would indeed be illegal for the innkeeper to do.