Updating
How to apply updates.
To apply update, you need to login to your server as the user account created at the point of installation.
After installation, don't rename your project folder. If you do so, a new instance of cryptitan will be built on the next startup.
Navigate to the home directory i.e.
/home/neoscrypts/
cd ~Stop cryptitan before you proceed.
./cryptitan stopDelete previous backup directory if any.
rm -rf cryptitan-backupBackup the database (you can delete all other backup files in the storage/backups directory to have only the latest database backup file in the directory).
./cryptitan artisan backup:databaseMake a backup of the project folder (ensure there is no existing backup directory). For example, if your project folder is called
cryptitan, run the following command to save a copy into another folder, e.g.cryptitan-backup
rsync -a cryptitan/ cryptitan-backup/The ending slash "/" of the source and destination directory is required.
You should make a backup of the folder before you proceed, so you will be able to rollback in the event of an unexpected error.
Upload the update file using WinSCP to your home directory. (see: Uploading via SFTP).
Unzip the uploaded file.
unzip cryptitan-source-file.zipYou should have a folder, e.g. cryptitan-2.0.0, where 2.0.0 is the version you want to update to.
Copy and overwrite the new files into cryptitan directory:
rsync -a cryptitan-2.0.0/ cryptitan/The ending slash "/" of the source and destination directory is required.
Navigate into cryptitan directory and run the command:
./cryptitan updateFinally, run the command to rebuild and start:
./cryptitan recreateRolling Back
In the event of an unexpected error, and you need to rollback to a previous state.
Rolling back is not the best solution in some situations. This is because there are changes that could have been made on the database that is not compatible with the older version. If you experience any bug, submit it to us and we will patch it as soon as possible.
Stop cryptitan.
./cryptitan stopRename the cryptitan directory to cryptitan-old.
Rename the cryptitan-backup diectory to cryptitan.
Navigate to the cryptitan directory and move the latest database backup file from storage/backups to the root directory.
Rename the backup file to cryptitan.sql.
Start up cryptitan.
./cryptitan up -dRun the command:
./cryptitan mysql < cryptitan.sqlRun the update command:
./cryptitan updateFinally, run the command to rebuild and start:
./cryptitan recreateUpdating docker-nginx
Navigate into the
docker-nginxdirectory:
cd ~/docker-nginxRun the pull command:
git pullCheckout to the 2.x branch:
git checkout 2.xThen start up the service:
./nginx up -dLast updated