Archive for May, 2015

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.