Full Trust European Hosting

BLOG about Full Trust Hosting and Its Technology - Dedicated to European Windows Hosting Customer

Windows Server 2016 SSD Hosting - HostForLIFE :: Automating Database And Folder Backups On Windows Server

clock September 20, 2021 07:34 by author Peter

It is unnecessary to state the importance of having an automated backup strategy for your servers.
Every server administrator has to go through the tiring job of setting up backups which include writing scripts, scheduling tasks, setting up alerts, and so on.

To simplify this task, I have designed a simple utility to help server administrators and database administrators automate backups. This utility can automate MSSQL, MySQL, and Folder backups.
 
This an open-source project hosted at GitHub.
 
You are welcome to suggest new features or contribute your own.
 
Part 1 - Installing the utility

 

  • Download the setup file from the GitHub repository (Installer\bin folder)
  • Install on the server where you need to set up backups

After you run the application, you will see the following screen:

Part 2 - Defining Backup Jobs
Click on the 'Settings' button on the bottom right to configure backup jobs.
On the first tab, 'MSSQL Server', click on the 'Add' button to add a new MSSQL backup.
 
Define the server details as shown below. Check 'Enable Backup' and specify the backup time


After entering the details, click on 'Validate and Save'.
The utility will try to connect with the MSSQL Server using the given credentials.
If the connection is successful, the entry will be saved and you will see it in the list as shown below,

Similarly, go to the second tab 'MySQL Server', and click on the 'Add' button to add a MySQL backup.


You can also backup specific server folders by using the 'Folder Backup' tab.


Part 3 - Specifying Local Storage Location
After defining the backup jobs, go to the 'Local Storage' tab and designate a folder on your server where you wish to store the backups.
Be careful that this folder should not be one of the backup folders, otherwise the program may behave unexpectedly.

Since all backups will be stored in this folder, it is recommended to set an auto-delete policy as shown above.
 
You can set a longer duration like 15 days or so as per your convenience.
 
Part 4 - Remote Storage

After backing up files locally on the server itself, we need to move them to remote storage.
Currently, the utility supports Amazon S3 backups. Go to the 'Remote Storage' tab and define your AWS credentials to automatically move files from 'Local Storage' to 'Remote Storage'.

You can also select the option to auto-delete files immediately after they are uploaded to AWS S3.
Click on 'Validate and Save' to check if the credentials entered by you are valid to write to the AWS S3 bucket.
 
Part 5 - E-Mail Alerts
You can easily set e-mail alerts to notify you of successful/failed backup jobs (both local and remote backups)
Click on the 'E-Mail Settings' tab and define your SMTP credentials as shown below.


There are four types of alerts available:

  • Send mail on failed local backup
  • Send mail on failed remote backup
  • Send mail on successful local backup
  • Send mail on successful remote backup

Click on 'Validate and Save' to check your e-mail credentials. This will send a test mail to the 'Recipient E-Mail' address. Click 'Close' to go back to the main screen.

The number of backups defined will appear here. It will also show the status of AWS S3 settings and E-Mail settings. Click on the 'Install' button to install a backup service to process your jobs in the background. This may take a couple of seconds. The status will change, as shown below:


To view logs, click on the 'Logs' button. Here you can find the logs of backup jobs and results for troubleshooting purposes. After this, you can click on 'Exit' to close the User Interface. The backup service will keep running in the background and will take care of defined backup jobs. To verify the backup service status, open 'services.msc' and check for service name 'Runtime Backup Service'

Here is a sample e-mail sent by the utility:


I hope this will help your business and save you lots of time in managing multiple backup scripts and configuring alerts. Using this unified interface, you can automate your backup jobs easily.


Windows Server 2016 SSD Hosting - - HostForLIFE.eu :: Dedicated Servers As The Secured Solutions

clock September 25, 2020 09:16 by author Peter

When it comes to the option of dedicated servers, you may find it costly in comparison to other web hosting options. But ultimately, the choice is worth making because plenty of commercial benefits are integrated into this web hosting plan. Let’s see how it is a better option than others web hosting plans.

Better uptime
In dedicated hosting arrangements, the service provider reserves the SLA,  including the solution of hardware failure. The service provider maintains a support team for 24x7. With expert skill sets and ITIL complaint methods you can be sure about a high uptime.

Cost efficiency
This is a cost efficient option. According to the plan, a dedicated hosting service provider is responsible for upgradates and maintenance of hardware for maintaining connectivity, and for offering a friendly physical environment. Under this plan, you as a user have no obligation to pay for the total server room or for employing a service administrator. Under this plan you have to pay for the services you will be using.

Reliable bandwidth
Under this web hosting plan you will get to enjoy higher internet speed. There is no chance to lose the speed as there is no risk of sharing the connection. This will help in faster communication, upload management, and uninterrupted business presence.

Complete control on applications
If you select dedicated web hosting, you will enjoy a complete monopoly of decisions about using site management tools and allied other applications to boost your hosting environment. However, about the tools, you need to get prior approval from your hosting service provider that they will be able to give you backend support to maintain them.

Better security arrangement
Dedicated hosting service offers uninterrupted access to physical server. The security arrangement includes supervision cameras, Biometric Access Control System, round-the-clock patrolling, etc. for improved security. Advanced service providers often provide additional supports like DDos guard, web application firewall, VAPT, and security event management.

These reasons can clearly  justify why Dedicated Server is a better option. It is clearly understood that although expensive, this category of web hosting service offers excellent ROI (Return over investment).



Windows Server 2016 SSD Hosting - HostForLIFE.eu :: Server And Service Health Check And IP Capture For Bulk Servers

clock March 14, 2019 11:40 by author Peter

This Script will help in checking the below basic functionalities of the Bulk Servers. It will do so during Migration, Patch and Monthly Restart activities

This Script is added with the below functionalities, 

  1. IP Capture -- >Collects the DNSHostName,Description,DHCPEnabled,IPAddress,IpSubnet,DefaultIPGateway,MACAddress,DNSServerSearchOrder for all Enabled and IP Discovered NICs
  2. Services Status -- >It checks all the Services Automatic set and not Stopped services and provides the output.
  3. Server Status –- >Checks the Servers reachability and provides the output on screen
  4. Server Shutdown/Reboot -- >Checks the server status and perform Bulk Shutdown / Restart at once with Event Description Keyed.

Output Samples



Windows Server 2016 SSD Hosting - HostForLIFE.eu :: Dedicated Server Vs VPS For Game Hosting

clock December 14, 2018 10:28 by author Peter

There are many different types of servers, each with its own strengths and use cases. Dedicated servers and virtual private servers are the most popular in the game hosting world, but which is right for you?

Both provide a complete server environment on which you can run any software, including games. From the perspective of the user, dedicated servers and virtual private servers are similar, but which you choose depends on the requirements of the games and the number of players you intend to host.

Dedicated Server

A dedicated server is a physical computer in a data center. When you run software on a dedicated server, it runs on the “bare metal”. The full resources of the physical machine are available to the user and any software they run.

Virtual Private Server

A VPS is a virtual machine. You can think of it as a simulated server running in software — a hypervisor — on a dedicated server. That makes virtual servers flexible: they can be resized or moved to a different physical server.

Server hosting providers run many virtual private servers on a single dedicated server, each of which gets a slice of the server’s resources: RAM, storage, CPU, network bandwidth. When you lease a virtual server, you choose how big that slice is.

VPS hosts often oversell virtual servers, allocating more resources than the underlying physical server has in the hope that clients won’t need all of the allotted resources at the same time. Games need all the resources they can get, so overselling can cause contention and performance issues that affect gameplay.

Dedicated servers have resource limits too, but those limits are clearly displayed when the server is leased. Server hosting providers can’t oversell dedicated servers (although they might oversell network connectivity).

How To Choose A Game Server

Most games that can be self-hosted provide guidelines about the server resources they need. Check the requirements to make sure the server you choose is capable of running the game with the number of players you expect to host.

Add-ons, modules, and expansion packs can increase the amount of RAM and storage you need, so be sure to take that into account.

Cheap VPS

A low-powered cheap virtual private server won’t cut it. Inexpensive virtual servers — think $5-$10 — allocate minimal processing power and RAM. They don’t provide the resources needed by even a simple game.

For example, Minecraft requires a minimum of 2GB of RAM. The cheapest VPS game servers provide 1GB or less. With 2 GB, a VPS can support 1 - 4 players with acceptable performance. More than five players requires 3 GB and more than 10 requires 8 GB.

High-Powered VPS

Some VPS providers offer higher-powered virtual private servers with sufficient resources to host games. They are often marketed as hybrid servers: fewer virtual servers are hosted on the same dedicated servers and each server has more resources.

Hybrid servers can provide decent performance as a moderately busy game server. They are less expensive than dedicated servers, but the prices of the most powerful hybrid servers are in-line with similarly specified dedicated servers.

Dedicated Servers

Dedicated servers offer the best game performance. They range from moderately powerful machines ideal for small personal game servers with a handful of users to the most powerful single-chassis machines available.

A top-tier dedicated server may have multiple processors with dozens of cores, hundreds of gigabytes of RAM, and several terabytes of storage. They are capable of hosting hundreds of concurrent users without breaking a sweat.

You can expect to pay under $100 per month for a low-end dedicated server more powerful and reliable than most VPS’s on the market. For a top-tier dedicated server, you will pay in excess of $1000 per month.

A Word On Networking

Network performance is just as important as server performance. The most powerful dedicated server provides a poor gaming experience if it is hosted on a high-latency network.

Most hosting providers advertise the bandwidth they provide with each server: the amount of data the client can transfer in and out of the provider’s network. That is important, but make sure that the network is also optimized for low latencies (often referred to as ping rates by gamers).

In Conclusion

Your choice of a game server should take several factors into account,

  • The resource requirements of the games you intend to host
  • The number of concurrent users
  • Your budget

Generally speaking, a dedicated server is the best solution but a high-end virtual private server might be good enough, depending on the game and the number of users.



Windows Server 2016 SSD Hosting - HostForLIFE.eu :: Load Balancing

clock September 21, 2018 11:48 by author Peter
What is Load Balancing ?
Distributing network traffic across multiple servers effectively is called Load Balancing.To meet high volumes, it generally requires adding more servers. Load Balancer routes the client requests to the servers in an optimized way and takes care that no server is overworked. If a new server is added to the group, It will start sending requests to this new server.


Load-Balancing Algorithms
Why did algorithms come into the picture ? Actually Load Balancer selects the server based on two factors,
  • periodically pinging server to check its availability.
  • defined algorithms - based on which load-balancer selects the server.
Algo 1 Least Connection (Default algorithm)
The least connection is the default algorithm to select server. Server which has the least number of active transactions is picked by Load Balancer to handle request. Load Balancer maintains records of transactions for each server.

Now discuss this in detail: Let's say all the servers have the same capacity and still some of the servers are overloaded as there may be the situation that the client stayed in those servers for longer duration and connected to other severs for shorter duration. Active connections on the server where client stayed longer will pile up and hence based on the least connection algorithm Load Balancer will route the request in the server with least active connections,

Weighted Least Connections

Now let's consider the above Least Connection algorithm with different server capacities (CPU/RAM etc.). You would definitely want to allocate more requests to the higher capacity server than the lower capacity servers. Weighted Least Connection is the solution.

Let's say there are 2 servers, server 1 and server 2 and server 2 has high configuration.With this algorithm Load balancer will allocate more requests to server 2 to utilize it better. Like Least Connection this also allocates request to the server withthe least number of active connections but the higher configuration server will handle more requests based on the right proportion defined during the Load Balancer setup. Weight proportion is calculated by the server capacity. Server 1 : Capacity X, Server 2 : Capacity : 10X the weight for each server would be 1:10 . There might be the scenario if you don't want to overload any of the servers for some reason, you may use this algorithm to give extra weight to other servers.

Round Robin

Round Robin is a vastly used and simple algorithm. Load Balancer distributes requests in the cyclic order irrespective of server inefficiencies. Both the Servers are ready to take request, suppose request comes and load-balancer routes to Server 1 then if a second  request comes it will be routed to Server 2. The third and fourth will be routed to Server 1 and 2 respectively in a cyclic order. Even if one of the server has stronger configuration i.e. RAM, CPU etc. As per Round Robin algorithm Load-Balancer will follow the cyclic order.

Algo 4 Weighted Round Robin

Like Round Robin this is also cyclic but the higher configuration server will handle more requests.Rest it is same as Weighted Least connection algorithm i.e. weight would be defined during Load Balancer setup and high weight server will handle more requests.

i.e. if weight proportion to server 1 and server to is 1:10. first 10 requests will go to server and 11th request will go to server 1 and next 10 request will go to server 2 and so on.

Algo 5 IP Hash

This algorithm generates a hash key using client and server IP addresses which means this key would be assigned to client for subsequent requests which assure that the client is routed to the same server that it was using earlier.This algorithm can be used to achieve Session Persistence or Sticky Session.

Session Persistence

In the multiple server environment a user might experience losing cart items during navigation. Persistence session or sticky session is the culprit. As you know Http is a stateless protocol which means in subsequent requests it doesn't maintain any information about the user so to identify server uses client's ip or cookie to track users session. Sticky session is to make sure all the requests goes to the same server which has its user's session tracking information.

Layer 4 & Layer 7 Load Balancing

In Layer 4 Load Balancing , Load balancer decides the server on which it will redirect the requests on the basis of the IP addresses of the origin and destination servers (Network Layer : Layer 3) and the TCP port number of the applications (Transport Layer : Layer 4).
On the other hand Layer 7 Load Balancing decides routing on the basis of OSI Layers 5, 6, and 7 which together makes Http. To get an overview of OSI Model, please read my post .


Windows Server 2016 SSD Hosting - HostForLIFE.eu :: PowerShell Script To Reading SQL Data, Creating CSV File And Push To SFTP/FTP Path?

clock September 7, 2018 11:16 by author Peter

The below powershell cmdlets are used to create csv files by querying the SQL server.

All the variables containing the server name and DB details:
    #Variable to hold variable 
    $SQLServer = "XX.XX.XXX.XX" 
    $SQLDBName = "TestDB" 
    $uid ="domain\userID" 
    $pwd = "password123"  
    #SQL Query 
    $SqlQuery = "SELECT * from tableName;" 
    $SqlConnection = New-Object System.Data.SqlClient.SqlConnection 
    $SqlConnection.ConnectionString = "Server = $SQLServer; Database = $SQLDBName; Integrated Security = True;" 
    $SqlCmd = New-Object System.Data.SqlClient.SqlCommand 
    $SqlCmd.CommandText = $SqlQuery 
    $SqlCmd.Connection = $SqlConnection 
    $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter 
    $SqlAdapter.SelectCommand = $SqlCmd  
    #Creating Dataset 
    $DataSet = New-Object System.Data.DataSet 
    $SqlAdapter.Fill($DataSet) 
    $DataSet.Tables[0] | out-file "\\location\test.csv" 


Note
When Intergrated Security ="true" is used, the cmdlets use current logged in user credentials - network credentails if Integrated Security ="false" we need to use the declared $uid and $pwd while establishing the connection.

The File is saved in the location or FTP path as test.csv
The SFTP is Secured FTP; the following powershell command helps to move any file to the SFTP location and it needs "Posh-SSH module" We need to install this module.https://github.com/darkoperator/Posh-SSH

The Powershell variable mentioned in the below code snippnet stores all the details of the SFTP or FTP server, where the files need to be moved.
    #Declaring Variable 
    $sourceSFTPIP = "xx.xx.xxx.xx" 
    #IP address of the SFTP server 
    $LocalFilePath = "C:\test.csv"; 
    $SFTPPath = ".\sharedFilePath\"  
    # folder location inside SFTP server 
    $secpasswd = ConvertTo - SecureString "password" - AsPlainText - Force 
    # the below object is used to key in the username and password automatically rather than promt the user to username and password 
    $mycreds = New - Object System.Management.Automation.PSCredential("username", $secpasswd) 
    # Module need to use SFTP Path 
    Install - Module - Name Posh - SSH# get sftp password this command can be used 
    if user need to feed in the user name and password at the time of running the script 
    # $credential = Get - Credential# Creating PS session to be used 
    $session = New - SFTPSession - ComputerName $sourceSFTPIP - Credential $mycreds - AcceptKey 
    # Move File using ps session 
    Set - SFTPFile - SessionId $session.SessionId - LocalFile $LocalFilePath - RemotePath $SFTPPath 
    $session.Disconnect() 


We need to disconnect the session that was created to do this operation. Once it has run,  the file that is present in sharepath is moved to the SFTP server location.



Windows Server 2016 SSD Hosting - HostForLIFE.eu :: How To Securely Delete Files From Your Servers?

clock August 15, 2018 11:40 by author Peter

Do you know what happens when you delete a file in a GUI or run rm file.txt on the command line? If you said the file is deleted, you are only half right. In fact, the data stays just where it was before you “deleted” it. You can’t see it because the link the operating system used to identify the file and show it to you no longer exists. But the data is untouched until the operating system uses the space for a different file.

It’s easy to restore data that has not been securely deleted. That’s bad news if the hard drive the data is on is sold, leased to someone else, or thrown in the trash. There are business, security, and legal consequences if server data is not securely deleted.

The only way to securely delete data is to overwrite it. You could also destroy the drive, but businesses typically lease servers that they don’t have physical access to or they own. They need to be able to securely delete data remotely. A quick rm doesn’t cut it.

Before I outline the best way to securely delete a file or volume, a word of warning. If you do this, the data will be gone forever — that’s the point. Before running any of these commands, make sure you really mean it.

Securely Deleting A File

As I have already said, rm removes directory entries. It does not delete data. To securely delete the data, you must use a tool that both removes the link and overwrites the data.

One such tool is shred, which will repeatedly overwrite the file’s data with random bytes.

shred -u file.txt

Shred overwrites the file three times with random data, although you can specify how many times the data is overwritten with the -n option. If you don’t use the -u option, shred will overwrite the data but it won’t remove the file.

Securely Deleting A Drive

The shred utility can securely erase drives, but we’ll explore an alternative.

Before running these commands, check that you have correctly identified the drive you want to erase. The command will run on the boot and root drives without warning.

Linux represents drives as files. For example, the file /dev/sda1 represents the “first” drive on your server. The dev directory is not a normal directory, but a collection of special files representing devices connected to the server.

To see the drives connected to a server, run this command,

`fdisk -l`

Identify the drive that you intend to erase all data from and take note of the special filename. We’re going to use dd to overwrite the data on this drive with either random data or zeroes. The dd command “converts and copies a file”.

In this case, we’re going to take data from a special file and overwrite our target drive with it. Linux provides several special files that generate a stream of data, including /dev/zero and /dev/urandom, which contain lots of zeros and pseudorandom data respectively.

dd if=/dev/urandom > /dev/ss__ # replace __ with drive number

Here, we designate /dev/random as the input file and direct its data to overwrite the drive. This will destroy all data on the drive.

For added security, you can repeat the dd command several times or alternate between random data and zeros with:

dd if=/dev/zero of=/dev/sd__ # replace __ with drive number

On modern high-density drives, multiple passes are usually not necessary, but it doesn’t hurt.

Limitations

There are some limitations to this approach that you should be aware of. If the data is being backed up to a different drive, it may remain accessible. If the drive uses a modern journaling filesystem like ext4, some data may not be erased properly. SSD wear leveling can also interfere with secure deletion.

For sensitive data, it may be best to use an encrypted volume rather than relying on secure deletion. The data from an encrypted volume cannot be recovered without the key even if it has not been securely deleted.



About HostForLIFE

HostForLIFE is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2019 Hosting, ASP.NET 5 Hosting, ASP.NET MVC 6 Hosting and SQL 2019 Hosting.


Tag cloud

Sign in