How to Automatically Backup Your Web Server Files With WinSCP over FTP

WinSCPYou’ve heard it time and time again: back up your data. There are plenty of backup solutions, but nothing is better than an easy and free solution. So with a few lines of code and a very helpful program called WinSCP, we’re going to set up an automatic sync between your FTP server and your home computer.

Requirements

  • An FTP server and access credentials
  • A Windows computer
  • A copy of WinSCP (Windows only)

Setting Up WinSCP

Once you've downloaded your copy of WinSCP, install it on your computer. It also wouldn't be a bad idea to start remembering your FTP address, username, and password while WinSCP is installing.

From the login screen, enter your host name (i.e. ftp.puresourcecode.com), username, and password. You can use either FTP or SFTP, but be sure to change the port number the appropriate port your FTP host has provided you. Then click Save to save the profile. Open the profile to log into your FTP server. This will verify that you typed the right credentials in the profile.

image

Create the script

We’re going to create a simple script that logs into your FTP server, tells WinSCP where to download the missing files to on your computer, and then creates a log file that records FTP activity. Go ahead and open Notepad on your computer. Copy the following script template into Notepad:

option batch on
option confirm off
open ftp.puresourcecode.com
cd backups
option transfer binary
get /testremote* f:\backups\testlocal*
synchronize local f:\backups\testlocal testremote
exit

WinSCP will answer all prompts negatively to avoid holding up the script. Then it will automatically overwrite files when prompted. It then logs into your FTP server using the profile we created earlier, changes directories (if needed), and transfers binary (as opposed to ASCII). Finally, it reads the remote FTP directory and transfers files to the specified local directory. For even more options, check out the official WinSCP scripting page.

Now before you modify or run this script, we suggest creating test directories on both the remote and local targets. The last thing you want is to accidentally wipe your FTP server without any backups. So create a directory on your computer called “testlocal” (we created it under f:\backups) and another called “testremote” on your FTP server (we created it at the root). Once you run the script and it executes successfully, save it as “sync.txt” to your computer (we saved ours in our testlocal folder).

Automating the script

Now you’re ready to automate the script. For this we can use Task Scheduler.

image

Click on Create Basic Task and follow the following screens. First insert a name for your task.

image

Select when you want to start the task.

image

Select Start a program in the next screen.

image

Now click on Browse... and find WinSCP executable file in your program folder.

image

Underneath, add

/console /script=f:\backup\sync.txt /log=f:\backup\log.txt 

to Add arguments. Be sure to change the arguments if your sync.txt is in a different location and if you want to generate the log file in a different location. Click Next.

So the task is created!

Feed Power BI from Application Insights

I’ve tried to connect PowerBi with Application Insights. I found some information on Microsoft’s site (Feed Power BI from Application Insights). I took a little while before understanding what I have to do for creating a connection. I’ll show you what you have to do.

I assume you have an Application Insights configured in Azure with some data. Open you Analytics.

For a new report, open PowerBi Desktop and select Get Data.

PowerBI-splashscreen

Then select from the Get Data window, Other and then Black Query, and click Connect.

powerbi-getdata2

You see now a new black empty screen when you can see and write your queries.

powerbi-queries

Click on Advanced Editor. Here we have to paste the code for Application Insights for your query.

powerbi-advanced-editor

Jump on Application Insights. I wrote a simple query in Analytics.

traces
| order by timestamp desc

appinsights1

Now click on Export and select Export to Power BI (M Query).

appinsights-export

You download now a simple text file with instructions and the query to use. Copy your query and paste it on the window in PowerBI. PowerBI asks you to define what kind of connection you want to use. In my case I selected Organization Account.

powerbi-authorization

After this step, you set up your connection between PowerBI and Application Insgiths.

powerbi-application-insights-connected

You got the connection and data from PowerBI. Save your dataset clicking on Close & Apply. In the main screen of PowerBI, you can create every report you want!

How to reinstall Office 2010 without the installation DVD

If you need to reinstall your Microsoft Office 2010 software but do not have the installation discs, you can download the software or order a backup DVD from the Microsoft Office 2010 website.

To download a backup copy of Office 2010

  1. Locate your 25-character Microsoft Office Product Key. You will find the product key on the original product package, on a Product Key Card sent with your computer or in your Order Confirmation email.
  2. Go to the Get a backup of Office 2010 web page and click the Download button.
  3. Enter your Office 2010 product key. You will be given the choice to download the software or order a DVD copy for a fee.
  4. Once the software is downloaded, double-click the downloaded file and follow the on-screen instructions to install and activate your software.

Skype tag

<meta name="format-detection" content="telephone=no">

<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE">

Advertsing

125X125_06

Planet Xamarin

Planet Xamarin




TagCloud

MonthList