Archive for the ‘Windows’ Category

Using xcopy for backing up files and folders

Monday, July 11th, 2016

If you want to backup a specific folder and do not want to use backup software there is always the xcopy command. Xcopy is primarily used to back up files and folders across a network to a specified device. This example is how to back up a folder on the network to a thumb drive on a server. (more…)

Backup Exec error Buex: Failed – Physical Volume Library Drive not available. Backup Failed, errorCode=-536837876

Tuesday, August 18th, 2015

Overview

Backup Exec is throwing the error Buex: Failed – Physical Volume Library Drive not available. Backup Failed, errorCode=-536837876. Prior to this error a tape was “stuck” in the tape drive. Holding the eject button in for 15 seconds resets the tape drive and the tape is ejected; however, subsequent backups cannot find the physical library (tape drive). (more…)

Protobase error message: M47 000000000157 FAILED COMM DIRECTOR NOT RUNNING

Wednesday, August 12th, 2015

* Restarted the credit card modem
* Opened device manager and disabled and re-enabled the COM1 port.
* Commands we ran from a command prompt:
cd \pb
pbfe -i1.in “This is a fake credit card transaction”
type 1.out “Check the error message is should say invalid credit card if the modem is working”

Tested on the servers running Protobase and it is working now.

Migrating VSI-FAX 6.1 to a new server

Tuesday, August 11th, 2015

Moving VSI-FAX to a new server is relatively simple and VSI-FAX 6.1 is compatible with Windows 2008 and 2012.
Here are the steps to migrate VSI-FAX:
(more…)

Adding RDX device to Backup Exec 2012, 2014, and 12.5

Sunday, May 24th, 2015

Overview: The business was using a tape drive to back up data from various systems using Backup Exec. The tape drive was experiencing problems, so rather than purchasing another tape drive the decision was made to purchase SSD drives.

Purchasing SSD drivers for backup purposes is considered the norm. However, there are a few considerations before moving from a tape drive to a RDX device.

  1. If the organization needs to be SOX (Sarbanes – Oxley) compliant and are currently using a tape drive, the tape drive will need to be in working order for audit purposes since the previous seven years’ worth of backups are on tape.
  2. RDX devices do not provide the data compression of tapes. If the data being backed up to tape was 200 GB with a compression ratio of 2:1 the backup takes 100 GB on tape but will take 200 GB on an RDX device.
  3. The up-front costs of implementing a RDX solution is lower that a tape system, but the SSD disks tend to be 2 to 3 times the price of comparable tapes. Expect to get one year out of the SSD disk before it needs to be replaced, so over a period of time the costs associated with a RDX solution will equal the cost of the tape solution.
  4. Many RDX solutions are USB in nature where tapes drives are generally SCSI, so the backup will be limited by the USB speed. As the SSD disk becomes fragmented, expect the backup to take a longer period of time to complete.

(more…)

Clean up Prophet 21 P21Forms directory on Windows servers using forfiles command

Tuesday, May 12th, 2015

Purpose

Many applications create files for logging the functionality and errors occurred during operation. There are times the log files are not cleaned up and start to accumulate within a folder on the operating system.  Using the “forfiles” command to reduce the number of files in a directory (folder) for faster indexing (listing) of files in Windows 7, 8 and Windows Server 2008, 2008 R2, 2012, 2012 R2, and 2014.

Analysis

Running nightly backups of websites to an external USB drive reduces the space on the drive since every backup is being retained for archive purposes. The files are compressed to save space, but accumulate due to no cleanup module. Using the “forfiles” command from the command line, in Task Manager, or within the actual backup script will reduce the number of files within the directories (folders).

Note: Forfiles will only accept single arguments for search criteria, so if the directory (folder) has multiple search criteria, in the nightly backup example there are both .tar and .bak files that need to be removed, so you will need to perform a loop within a batch file.

Note: Be careful with wildcard characters like “*” and “?” since forfiles will bypass the recycle bin.

Note: This is a way to delete files from the command line or a batch file and not a way to bypass other deletion methods. Explorer.exe will consume CPU and memory while running so consider running forfiles during off-hours.

Note: Test forfiles with a non-intrusive command like dir to examine the files selected before running forfiles command section with a dir command.

Process

  1. Open a command prompt by typing cmd in the search or run text boxes in Windows.
  2. At the command line type forfiles /? and press Enter
    1. If you receive the message “forfiles is not recognized as an internal or external command, operable batch file or program” the means the environmental path is not in the path statement on the PC or server.
      1. 64 bit system: C:\Windows\System32\forfiles
      2. Use the full path in the command (recommended for automated tasks) or add the path to the Environmental Variables – Path statement
  3. Let us analyze the following command: “forfiles /P L:\Backups\MyWebsite\ /M *.tar /D -200 /C “cmd /c del @file”
    1. /P is the path directive. In the example the folder is on the L: disk and under the Backups folder.
    2. /M is the search pattern. The search pattern should be as close to finding the files that the command will execute against.
    3. /D is the date for the files that will be acted against by the command. In this example -200 means delete any files with a .tar extension that is over 200 days old.
    4. /C is the actual command. “cmd /c del @file” is what will be executed against any .tar files that are over 200 days old in the L:\Backups\MyWebsite\ folder.
    5. /S **CAUTION** with this flag. This means recursive and will follow into subdirectories within the main directory. This could have undesirable effects and should be tested with a non-final command like “cmd /c dir @file”. Taking the previous command “forfiles /P L:\Backups\ /S /M *.tar /D -200 /C “cmd /c del @file” will delete all TAR files over 200 days old in any folder under L:\Backups.
  4. Logging in forfiles can be accomplished by creating a log file, like forfiles /P L:\Backups\ /S /M *.tar /D -200 /C “cmd /c del @file” >> C:\temp\myfiles.txt

This is a small example of what the forfiles command can do to clean up large number of files on a Windows system.

BackupExec or Backup Exec VSS issue with Windows System Path

Wednesday, November 26th, 2014

 

Problem: V-79-10000-11226 – VSS Snapshot error. The Microsoft Volume Shadow Copy Service (VSS) snapshot technology selected returned: “Unexpected provider error”. Ensure that all provider services are enabled and can be started. Check the Windows Event Viewer for details.

The following volumes are dependent on resource: “C:” .

Analysis: Since this was a VSS writer issue on a Windows 2008 R2 server, the first thing I ran was “vssadmin list writers” to see what writers were failing. The failing writers were all Windows system writers like the WMI Writer. So I re-registered the writers running a batch script, but you can accomplish the same thing by restarting the server. (more…)

Starting a console application in Microsoft Visual C++ 2010 Express

Tuesday, November 11th, 2014

Starting a Microsoft Visual C++ Studio Console Application

  1. Open Microsoft Visual C++ 2010 Express
  2. In the menu go to File – New – Project
  3. Click on Visual C++ and highlight Win32 Console Application
  4. Give the new project a name, default directory, and Solution Name
  5. Click OK and another GUI will pop-up
  6. On the Welcome to the Win32 Application Wizard click Next >
  7. On the Application Settings remove the check box from Precompiled Header and check Empty
  8. Click Finish
  9. When the new project opens right click on Source Files
  10. Go to AddNew Item…
  11. When the wizard opens highlight C++ File (.cpp) and give it the name of main.cpp
  12. Click Add
  13. Enter the following in the main.cpp file

          #include <iostream>

           int main()

{

               return 0;

}

Place your code after the first curly brace and before the return 0; to get started. Happy coding.

 

Windows 7 and 8 shutdown batch file to save electricity

Sunday, November 2nd, 2014

Hi Everyone,

If you are like me you work on your computer or use it to play games in the evening to alleviate stress. However, once you are finished using the computer you forget to turn if off. Now, for many this does not seem to be a problem but consider other aspects of leaving a computer running.

  1. Someone could gain access to a laptop webcam and see that no one is home or spy on people in the room.
  2. If you accidentally get a virus the PC which can turn it into a zombie or join it to a botnet. So while you are away your PC is working in the background.
  3. Some people just never turn the PC or laptop off because he or she feels the power saving options are sufficient.
  4. The amount that all the electronic devices are costing you per month in your electric bill.

Let’s examine the fourth possibility because it happened to me. My average electric bill when my kids were at home was $125 per month. When they left for college the electric bill dropped to $95 per month. When I deployed the shutdown script on my PC the electric bill dropped to $69 per month. Saving over $50 a month (you could save more) on your electric bill seems like a pretty good idea to me.

(more…)

Video for setting up LPD print services for Windows to share a printer on the network

Saturday, November 1st, 2014

Here is a nice video showing how to set up LPD print services in Windows so you can share a non-networkable printer on the network.

http://youtu.be/TmksGlGgz1Q