# Metadata Backups

> Save your songs' details, play counts, ratings and artwork to a file, restore them later, and use the backups made before every big change.

Your library's info (every song's details, play counts, ratings, the date each was added, and artwork) took years to build up. ClassicTunes can save it all to a single file, and put back any part of it later. It also saves one automatically before every change that affects many songs at once.

These backups are of your library's info, not your music files. To back up the music itself, copy the library's folder (see [Several libraries](https://classictunes.app/docs/libraries#whats-in-a-librarys-folder)). To back up a whole iPod, see [Snapshots](https://classictunes.app/docs/snapshots).

The controls are in **Settings › General › Backup**.

## Export your info

1. Open **Settings › General › Backup** and click **Export Info…**.
2. Choose where to save the file. It's named "ClassicTunes Info" with the date, as a .json file.
3. Click **Save**.

ClassicTunes says how many items it saved and how big the file is. The file holds every song's details, sync choices, play counts, ratings, date added and artwork, so keep it somewhere safe, such as another drive.

## Automatic backups

ClassicTunes saves a backup by itself, in the library's **Backups** folder, before each of these:

- **Tools › Re-read Info for All Music…**
- **Look Up and Replace Info**, for one album or several
- **Merging duplicates** (Tools › Find Duplicates…)
- **Merging albums** and **moving songs to a new album**
- **Converting songs once**, replacing their files, with Find Songs iPods Can't Play
- **Combining an audiobook** into one file
- **Restoring from a backup**

Each is named for what it was made before, with the date and time, such as "Before Merge Albums 2026-11-02 14.30.05.json". The last 10 are kept; older ones are deleted as new ones are made.

Click **Show Automatic Backups** to open the folder in Finder.

## Restore from a backup

1. Open **Settings › General › Backup** and click **Restore from Backup…**.
2. Choose a backup file. The automatic backups folder opens first, but you can choose a file you exported anywhere.
3. ClassicTunes shows when the backup was saved, how many items it has, and how many of them match items in your library now. Items that aren't in the library anymore are skipped.
4. Under **Restore**, choose what to put back:
   - **Song details (title, artist, album, year, track numbers, genre…)**: also album artist, composer, comments, grouping, disc numbers and titles, compilation, BPM and the explicit mark.
   - **Play counts, last played and ratings**
   - **Artwork**
   - **Date added** (off to start with)
5. Click **Restore**.

Your current info is backed up automatically first, so a restore can be undone by restoring that backup. When it's done, ClassicTunes says how many items changed and the name of the backup of your previous info.

Songs are matched to the backup by the library's own record of each song, then by file location, then by the Music app's identifier for songs imported from it. So a backup still works after songs have been moved within the library.

Restored details are saved in ClassicTunes, and reach your iPods at their next sync.

> **Note:** You can't export or restore while songs are being added or re-read. Wait for that to finish first.

## From AppleScript and Shortcuts

Exporting and restoring backups isn't scriptable, but the commands that change many songs at once save an automatic backup first, as they do in the app: `look up and replace info` and `convert for iPods … how replace file` in AppleScript, and **Look Up and Replace Info** and **Convert for iPods** (converting once) in Shortcuts.

```applescript
tell application "ClassicTunes"
    with timeout of 3600 seconds
        -- A backup is saved in the library's Backups folder first
        look up and replace info
    end timeout
end tell
```

See [AppleScript](https://classictunes.app/docs/applescript) and [Shortcuts](https://classictunes.app/docs/shortcuts).
