Posted on

Nakivo : Pre and Post Job Scripts on Linux Appliance

NAKIVO Backup & Replication provides you with the ability to run a script before a job begins (a pre-job script) and after the job has been completed (a post-job script)

SSH Login

Unsing, for example Putty, you have to login Nakivo Director :

Default ssh port for the Nakvo Director is 2221.

Login to nakivo appliance using this credential :

Username: nkvuser
Password: QExS-6b%3D

cd /opt

sudo su

you have to insert password again

mkdir backup

Change new folder permission

chmod 777 backup

Upload file script

Using for example WinSCP with the same above configuration (port and credential) , browse to the new folder /opt/backup and upload here your scripts sh.

Using putty give execution permission to files :

cd /backup

chmod +x ./your_file.sh

Take note of the full path of the script file : /opt/backup/your_file.sh

Config Pre and Post script

Using nakivo portal appliance now you have to implement your scripts on job execution. You need to use this guide :

https://prev-helpcenter.nakivo.com/User-Guide/Content/Backup/Creating-VMware-Backup-Jobs/Backup-Job-Wizard-for-VMware-Options.htm#Pre

Posted on

How to Deploy ASP.NET Core Web API on IIS Windows Server

(Tested on windows server 2012r2)

Install the .NET Core Hosting Bundle on Windows Server

The .NET Core Hosting bundle is an installer for the .NET Core Runtime and the ASP.NET Core Module. The bundle allows ASP.NET Core apps to run with IIS.

Current version:.NET Core Hosting Bundle installer (direct download)

(for this test we installed version .Net Core 8 on win 2012r2)

Visual Studio : Publish on Folder

After creating the ASP.NET Core application in Visual Studio, we can use the Visual Studio Publish Tool to deploy and run our app. For this project, choose to publish to a folder. Choose the folder and hit “Finish”.

In the next screen, where you see the settings for this deploy, click on “More Actions” and then on “Edit”.

Select :

  • Deployment Mode : Complete
  • Target Runtime : win-x64 (for our server)
  • File Publish Options : Delete all existing files prior to publish (flagged)
  • Database : Default Connection edit (if yuu need it)

Save this configuration, control it an Publish.

Copy the contents of the folder on the IIS server to the folder dedicated to the new site.

IIS and new site

Create the site on IIS. For the Application Pool you have to use default .NET CLR Version : v4.0.

Open your browser and call up the site. You receive the “page not found” error (404).

Remember that a site that hosts only calls web api. To verify that it works you can use the controller that Visual Studio sets by default when creating a site. Then type:

https://www.mynewapisite.com/WeatherForecast

and you will get a result. The site works!