.. Copyright (c) 2008-2016 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://www.openshot.org), an open-source project dedicated to delivering high quality video editing and animation solutions to the world. .. OpenShot Video Editor is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. .. OpenShot Video Editor is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .. You should have received a copy of the GNU General Public License along with OpenShot Library. If not, see . .. _upgrade_ref: Upgrade ======= 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 :ref:`release_notes_ref` 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/production-*.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. The 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`. .. code-block:: javascript :caption: Backup PostgreSQL Database (**old** AMI) cd ~/api python3 manage.py dumpdata > backup.json .. code-block:: javascript :caption: 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.