Let us say you want to run a script whenever your machine starts or restarts. This script might start any other program/software. In my case, I have a script that I want to run and it’s path is /home/ubuntu/serverstart.sh. This script simply starts a python server. To make sure that this script is always triggered after a restart or a shutdown, a service needs to be created. Steps Create a file named serverstart.
Backing up the data using pg_dump Consider a remote postgres instance like AWS RDS. To backup the data that is currently present in a database in that RDS server, we can use the following command pg_dump -U master_user -d blog_db -h dbhost.rds.amazonaws.com -vx -Fc > blog_export.pgsql The options v - Verbose output of the operation x - Do not dump privileges. This makes sure that the statements such as grant/revoke are not added.
Java Platform Module System What are Modules Modules are a new way of keeping code and data together in Java. It is a set of packages which includes classes and interfaces along with their resources such as property files and other static data. A module can require other modules (i.e.) it can explicitly specify that it depends on other modules. It can export packages too making them available for other modules to use.
What is JShell and why it is a big deal The Java Shell or simply JShell is an interactive tool for learning the Java programming language. It has been introduced in Java 9. What this does is, we can test new features right in the command line with out a need to create a separate class. For example, to print the current system time, we can simply call the static method java.