Upgrading to a new AMI requires migrating data from PostgreSQL and copying files (/home/ubuntu/api/video/). It is only recommended to upgrade if you have a strong need to (for example, a specific bug fix or new feature). Upgrading can be a technical and tricky process, and is only recommended if needed. See Release Notes for information on recent releases.

Configure the new AMI

First, it is recommended to configure your new AMI (using the same basic settings, IP Addresses, and credentials). Once configured, update the api/api/settings.py file to use the same credentials and settings as before.

Migrate Files

Next, copy the /home/ubuntu/api/video/ folder from your old instance to your new instance. You can use SSH or SFTP, or any number of tools or commands. But you must copy this entire folder to your new instance (to the same location).

Migrate Database

Lastly, backup data from PostgreSQL (Database: openshot_cloud, User: openshot_user), and restore on your new instance. Database can alternatively be backed up with Django. When loading data using loaddata (example below), you might encounter errors related to models.Token duplicate keys. To workaround that error, we can ignore that model when loading data: -e api_app.models.Token.

Backup PostgreSQL Database (old AMI)
cd ~/api
python3 manage.py dumpdata > backup.json
Restore PostgreSQL Database (new AMI)
cd ~/api
python3 manage.py loaddata -e api_app.models.Token backup.json

Patch & Support

As an alternative, you can contact cloud-support@openshot.org, and we can patch your existing server with our latest changes. This usually involves adding a public key to your instance, so we can SSH in, and copy our latest files, and apply any DB changes since your previous version. In the near future, we plan on automating this upgrade process to make it easier for everyone.