Preserving research data is more complex than just saving it on a hard drive or server. In fact, preserving digital data is more complex than storing paper as digital data degrades faster and you can't pick it up and read it. In general it is better to turn your data over to a qualified custodian - such as a data repository - which will take the steps necessary to preserve your data.
Many of the steps needed to preserve data overlap with the steps needed to share data. You may be able to satisfy both data preservation and data sharing requirements at the same time with good planning.
It is rarely feasible to preserve all data generated during a research project. Focus instead on data that is unique or difficult to replicate as data fit for preservation. If you are receiving federal funding then you also need to preserve the data which is needed to validate your research findings.
Most agencies want the DMP to articulate plans to ensure the "long-term preservation" of research data but do not define what "long-term" means. In general, it may be better to commit to a minimum amount of time that the data will be preserved than a maximum. A general rule of thumb for a minimum amount of time is to consider the amount of time it takes for a research paper to be cited and then to add 5 years.
Make sure that the time period you commit to is acceptable to your peers and follows the agency requirements.
The most responsible way to preserve your data is to turn it over to a responsible custodian such as a data repository. When possible, try to preserve research data in a repository which provides data curation services, not just preservation services. Curated data is more valuable, easier to reuse, easier to locate, and more highly cited.
Many data repositories have requirements for deposit - they may only accept certain types of data, have file size limits, or require a CC0 zero license. Make sure you are familiar with the requirements of the data repository you intend to deposit with.