Losing all the stuff on your phone used to be no big deal a decade ago. These days, it’s practically a Netflix horror movie plot. Wondering how to switch your iPhone, iPod, or iPad successfully, without losing anything in the process? If you’re looking to upgrade your iPhone ( these are the best iPhones to buy right now) to the newest model, it is possible to do so painlessly. Your photos, contacts, videos, message history, music, calendars, mail accounts, and many of your apps can all be transferred from your previous device to the new one. We’ve outlined the steps below.

1. Back Up Your Old iPhone or iPad

First you need to back up your old phone, which can you do via iCloud or your computer. You used to be able to use iTunes, but that app has since been replaced by three apps—Apple Music, Podcasts, and Apple TV—on Macs running newer operating systems. The computer backup steps are similar.

  • To back up your iPhone using iCloud, first be sure your device connected to Wi-Fi. Then go into your phone’s settings and click your name at the top, which will take you to your Apple ID page. Depending on which phone you have, you will either choose iCloud > iCloud Backup > Back Up Now, or after clicking onto your Apple ID page, you’ll see a list of devices your ID is signed into. If that’s the case, click on your iPhone. From there, choose iCloud Backup, toggle it on, click on Back Up Now, and let your phone back up while it’s still on Wi-Fi. It might be worth setting your new phone to automatically backup daily, but be aware that the cloud only stores 5 GB for free.

  • To back up your iPhone using a Mac computer, plug your phone into your MacBook or iMac and open Finder. On the left you should see your phone come up under Locations. You’ll be able to go through all your saved data, from music and podcasts to photos and files. If your photos have been saved via iCloud, they won’t show up here unless you turn that feature off. Under the General tab, you can select Back Up Now. To save Health and Activity, choose the option to encrypt your backup or else it will not save it; not saving unencrypted Health and Activity data is a default privacy feature. All iCloud backups are encrypted automatically.

  • To back up your iPhone using a Windows 10 computer, download iTunes for Windows and plug your iPhone into your laptop or desktop via USB. Click the iPhone button in the upper left, then go to Summary > Back Up Now. Encrypt your backup by clicking “Encrypt local backup” and setting a password. Encrypting allows you to back up your Health and Activity data, as well. To find your backups, click Edit > Preferences > Devices. Apple also goes through the steps here.

2. Turn Off Your Old iPhone

Once you’re fully backed up, turn off your old device. If you have a SIM card that you want to use, you can switch that from the old to new phone now. Lightly pushing a paperclip into the SIM tray hole will help you open it up.

3. Turn On Your New Device

Turn on your new phone and follow the steps on the Hello screen until you reach a screen that asks if you want to join a Wi-Fi network. Choose the network you wish to join.

4. Restore Your Backup

While still on that Wi-Fi screen, you can choose how to restore your backed up data.