The best way to preserve a carpet is to keep it dust free. Dust eats into the foundations. Clean it gently with a broom or vacuum regularly.
Air them in mild sunlight for three to four hours a few times in a year.
The carpets should not be washed at home or dry cleaned but sent to a professional carpet washer and hand washed with only natural detergents such as reetha and shikakai.
If you spill anything on the carpet it should be dried and cleaned immediately using a damp cloth or sponge and dried in sunlight or under a fan. You can also use plain soda water to remove a darker stain at the time of spillage followed by professional carpet cleaning the next day.
To avoid moths eating the carpets, when storing, pack them in a cotton or muslin cloth not in plastic. You can also place neem leaves, dried tobacco bark or naphthalene balls in muslin pouches, never in direct contact with the carpets.