Backup

A lot of backup suites are available in Windows, but with about half hour of your time, this will provide you with a backup solution.

Try the following just by filling the blanks in the scripts.

I’ve found the following combination to work pretty well. This combination is a D2D, with the possibility of a D2D2T otherwise D2D + Previous versions (Windows 2003 and on-wards).

So, let’s begin – the D2D backup – Robocopy.

Worthwhile mentioning – The below recommendation has been tested in an environment containing about 2Tb of Office docs and other various bits.

First use robocopy, the following script should be used by filling in the blanks – source, destination and whee you want your log file. I found this to take about 30 mins in a production environment.

The log location is going to be pretty important in that we will be firing this puppy to your SMTP server!

Take the following and paste it into a batch file with the above changes and set this up as a scheduled task:

@ECHO OFF
SETLOCAL

SET _source=C:source

SET _dest=\%computername%x$

SET _what=/MIR /COPYALL /B /SEC /A-:H

:: /COPYALL :: COPY ALL file info
:: /B :: copy files in Backup mode.
:: /SEC :: Copy security Descriptors
:: /MIR :: MIRror a directory tree
:: /XD :: Copy except for the following folders
:: /XF :: Exclude file(s) – ie the log file
:: /A :: Set attributes

SET _options=/R:3 /W:5 /LOG:c:sourcemailme.txt /NP /NDL
:: /R:n :: number of Retries
:: /W:n :: Wait time between retries
:: /LOG :: Output log file
:: /NFL :: No file logging
:: /NDL :: No dir logging
:: /NP :: No Progress – does not show progress bar

ROBOCOPY %_source% %_dest% %_what% %_options%

Ok so now you have replication between your source and destination. Great! Lets get some monitoring going.

The following vbs will allow you to send (yourself) and e-mail with the changes – probably worthwhile to dump the following into a vbs and run as a scheduled script, also remember to call it with from a back script with the following “cscript &scriptname&”:

Set objMessage = CreateObject(“CDO.Message”)
objMessage.Subject = “Log to self”
objMessage.From = “me@contoso.com”
objMessage.To = “backuplogs@contoso.com”
objMessage.TextBody = “Haha – you know you love some good spam!”
objMessage.AddAttachment “c:sourcemailme.txt”
objMessage.Send

Ok – so now you are getting a D2D and are also receiving logs – Sleek!

Now that this is going so well, we will probably want to some previous versions of your files using ShadowCopy. The limit to *how much* space you will want to allocate to your previous versions is highly dependent on the *type* of files you will want to recall – ie more space for large files such as videos. There is no right/wrong answer for this.. experiment and see what best fits the environment you are in – if you need to allocate more space to previous versions, so be it, if not, all the better.

The following script will be an easy way to trigger a shadow copy and should be scheduled as a daily job as well.

Grab the script below and dump into a VBS script:

Const VOLUME = “C:”
Const CONTEXT = “ClientAccessible”

strComputer = “.”
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\” & strComputer & “rootcimv2”)

Set objShadowStorage = objWMIService.Get(“Win32_ShadowCopy”)
errResult = objShadowStorage.Create(VOLUME, CONTEXT, strShadowID)

As far as shadow copy goes, I found the following allotment to work well on a 2Tb resulting in a 35 day retention period in an environment with little change – once again dependent to the amount of change in your environment. The screenshot is from Win 2008 R2, valid to 2012 and 2003 environments as well (given tiny gui changes).

backup - Shadowcopy

 

So, the follow is is now available in your “Previous files” and there is nothing stopping you dumping these files to your tape library – especially if you have a dedicated DAS or Backup NAS/LUN. Should look a little like this after running it for a while:

backup - prev vers

Result?

  1. Free backup using Ms built-in functionality.
  2. D2D Backups – free deduplication.
  3. Monitoring (to email) for this backup.
  4. Quick file restore without the need for tapes (Yes, I acknowledge HDDs don’t grow on trees but youg on also have to realize you are not spending on an Enterprise D2D dedup either piece of software either!)
  5. Possible D2D2T options.

This has server me well since 2003 days, never got the chance to document it.

Worth mentioning that Windows 2008 onwards also support multi-threaded robocopy-ing!

Best of luck for now – Go fourth and backup – maybe restore a little too!

Where to find drivers

So this is one that has been coming up since the beginning of time.

How do you find out what a piece of hardware is without taking your computer case apart or if you dont have physical access to your machine.

My current platform is Windows 7 but it will be very similar in the likes of server 2008, server 2003, XP, and Vista.

On pc, better said Windows boxes, go to your start, all programs, accessories, system tools, and “system information”.

Drill down to components, and problem devices.

You will note something similar to the following:

From here we now know the “VEN”/Vendor, and “DEV”/Device. So, VEN = 11AB, DEV = 4364

Your next stop is http://www.pcidatabase.com/

Looking at out previous step, this is what was entered in the search:

And the results show the actual hardware:

Done – now you do not need to spend hours searching through 101 contradicting forums.

 

Thanks for reading.

Reliable Citrix Printing

Contrary to common belief, Citrix printing CAN be reliable.

The following steps will guide you in attaining that.

The environment is Windows 2003 Server, Xenapp 4.5, and a wire array of clients; standard metaframe server.

So, probably a dumb question – what is the print spooler. Keep in mind that with this excercise we are looking to tie in the windows spooler and citrix spooler service.

The considerations are:

  1. The printing policy
  2. Native/Non-native drivers
  3. Discovering and Eliminating unreliable drivers
  4. Deleting faulty drivers
The printing policy:
  • Auto creation – Auto create all client printers
  • Print job routing: If you have a print server this will help skip another loop.
  • Native driver auto-install. This determines if your server will get cluttered with bad drivers in the long run. Do not automatically install drivers.
  • Universal driver: Use the Citrix Universal Print Driver:
Native/Non Native Drivers:
The best practice with drivers is to avoid both if Citrix was questioned. In real life, most environments will have a few native/non-native drivers which you HAVE to install. This is usually due to photocopier options, security and in general just something the Citrix Universal print driver does not handle.
BUT – We also need to make sure these drivers are safe and will not compromise stability.
This is a two part process, A. ensuring whether the driver in question is native (preferred), B. making sure the driver is reliable.
For this we need to two tools:
  1. Citrix’s Stress Tools – this will work on all windows environments and can be found in 32&64 bit flavours.
    This ZIP will need to be extracted to a local drive on the server you’re looking to test.
  2. Citrix’s Print Detective – this will also need to run locally.
Print Detective
  1. You will use this to identify what drivers are native or otherwise. Run the application from where you unzipped it. Right click and “Show Non-Native/Non-Citrix drivers only”.
  2. The main aim is to test the Drivers identified in step 1. Yes I know, there are some Microsoft printers in there, doing this exercise is adhering with Citrix’s guidelines and these drivers we “should” test.
Stressing the server
  1. Run your Stress Printer application from where you unzipped it.
  2. The options you need to look at are “The number of concurrent add events”, 5 is recommended, and “The number of times to repeat the test”, 5 as well. “Verbose mode” and “Apply these settings to all printers”  will need to be checked. The selected printers will be the ones we identified in the previous paragraph.
  3.  Ignore Warnings in the log. You are looking for 0 Errors.
Deleting Faulty drivers
  1. The identified faulty drivers will need deletion.
  2. Go to Start, Printers and Faxes, on the top right click on File, Server properties,  then choose the drivers tab. Select the appropriate driver then “Remove”

You now have a stable Citrix printing environment.

I intend on putting this up as pdf soon.

remote access how to

remote access how toWe saw previously ONE method to log off a user, that was the clean way of gaining remote desktop.
There is another way, a dirty way but it works none-the-less, and gains your remote desktop:

This approach gives you remote access (sitting in front of the machine/console). Add the /Admin switch in the mstsc box.

Additional to this, you will approach also has the ability of allowing you to install some programs that will only install via console.