Long-Term Datasets for the Understanding of Solar and Stellar Magnetic Cycles