When a database is migrated to another server by copying the database file or restoring it from a backup file, the original database user account references are also carried with it.
Those accounts contain the account IDs specific to the original database server.
To provide access to the restored database on the new database server we need to delete the old user accounts from the restored database and configure the database access in the new database server. This will re-create the user accounts with the correct IDs in the restored database.
When the Linux disk drive is full, first we need to identify the reason for the drive overuse. Many times the drive is filled with one large log file, that can be identified and truncated.
To list the directory sizes under the current directory execute
du -sh *
To empty a file, overwrite it with nothing, so the process that writes into it still can access it.
cat /dev/null > ./MY_LARGE_LOG_FILE
When we free up the disk space, the server needs time to recover and do some housekeeping. The load average numbers show how busy the server was in the recent minutes. Check the load on the computer with
Error: EPERM: operation not permitted, rename ‘C:\Users\MY_USERNAME\.config\configstore\update-notifier-nodemon.json.3604946166’ -> ‘C:\Users\MY_USERNAME\.config\configstore\update-notifier-nodemon.json’
In case of this error rename the C:\Users\MY_USERNAME\.config\configstore\update-notifier-nodemon.json to update-notifier-nodemon.json.ORIGINAL to allow NPM to use the file name as the target of a rename operation.
If the script successfully created the CodeDeploy application the first deployment starts automatically
In the AWS console open the CodeDeploy page
Select the application name
On the Deployments tab select the deployment
Check the deployment status
In the ECS cluster
In the AWS console select the cluster and the service
Select the Deployments tab
CodeDeploy starts to launch a new, Replacement task
At this pint the prod and test listeners of the load balancer both point to the old task version
When the new task started 100% of the traffic still routed to the old version
The load balancer’s Test listener starts to route traffic to the new task behind target group “b”
When the deployment succeeded and none of the specified Hook Lambdas (if any) returned failure, the Test and Production traffic both are routed to the new task version
The old (blue) task stays active during the time span we specified in the “termination_wait_minutes” variable of the Python script. During that time we can click the Stop and roll back deployment button to restore the prior version of the task.
While the old (blue) task is still available the deployment is still “running”. To be able to start a new deployment we need to click the “Terminate original task set” button.
When the wait time is over, the old deployment terminates in the service
If you get the error message
AWS CodeDeploy does not have the permissions required to assume the role …
make sure you have used the correct role ARN from
Deployment fails with error code 404
If you deploy a Socket.IO server make sure you add 404 to the valid Success Codes in both Load Balancer target groups.