This is a working version of the discontinued and unfortunately no longer working SpotMyBackup.
Backup and Restore your Spotify Playlists and "My Music".
This javascript based app allows you to backup all your playlists and import them in any other Spotify Account. It uses the OAuth-Functionality of Spotify to be able to handle your personal playlists.
In consequence, no credentials or data is stored or processed on the Webserver itself.
This has been hacked together last night so there is a lot of room for improvement, but at least it's working again.
There was a small issue with the authentication process, which i fixed using an express server which was faster for me, for code improvement ideas see below.
- Clone/Download Repository
- Install Node.js
- Run
npm install
- Create an app at https://developer.spotify.com/dashboard/
- App name : e.g. Michaels SpotMyBackup
- App description : For backing up my account
- Website : http://youripaddress:8080
- Redirect URIs : http://youripaddress:8080/callback
- In the User Management, add your second (new/old) account as well
- Second user might need to login into dashboard one time as well to confirm terms and conditions
- Copy
public/config.example.js
topublic/config.js
and edit it to reflect the same settings and the right client id - Run
npm serve-express
(equal to runningnode index.js
, see package.json) - Click Login on old account
- Export File
- Open in incognito window
- Click login on new account
- Import File
- Done
- When running this on my personal account, some of the playlists were not copied fully, some were empty on the target, but it was a good start.
- Dates like the time a song was added to a playlist get lost
Some ugly code here:
- we could integrate the express server functionality into the main index.html again to reduce the dependency
- we could propose using simply http-server as dependency while still allowing other web servers
- we could use typescript instead of js
- we could properly separate html, css and js
- we could host it online (github deploy actions etc.)
- we could merge open pull request features and improvements from the original page
- we could use different scopes (read/write) for the different actions (export only needs reed permission from spotify)
- we could catch some common errors to provide help instead of crashing
- I get the error
Error: Cannot find module './public/config'
: You forgot to create a copy ofpublic/config.example.js
(file namepublic/config.js
) - Can i use localhost instead of
youripadress
?: Yes, just use any available hostname. Make sure to also use it inside the Spotify dashboard. The only thing not working should be file:// urls.