Feb 122019

Recently, I was setting up Sage 50 Automatic Backups for a client. The utility lacks the ability to automatically clean-up old backups.

Each backup file created has the date postpended to the filename. “Overwrite the existing backup file” would only apply if you ran two backups on the same Company on the same day.

After time, the backup directory will need to be cleaned up. Instead of trying to remember to manually remove old backups, you can handle this problem with a simple batch script.

Open up notepad, insert the following, and save as whatever-you-want.bat. You’ll have to change the paths to match your environment.

forfiles /p "D:\Sage\Peachtree\Company\Backups" /m *.ptb /D -30 /C "cmd /c del @PATH"

Before you actually run this, you should use echo instead of delete and write the results to a text file. See below. The results.txt file will contain the files that would be deleted if you were actually using delete instead of echo.

forfiles /p "D:\Sage\Peachtree\Company\Backups" /m *.ptb /D -30 /C "cmd /c echo @PATH >> results.txt"

After you test it, you can add it as a scheduled task. In our case, we always have 30 days of backups on hand. In addition, we have cloud backups of these backups and so on…

Here’s more information on the Windows command forfiles: https://ss64.com/nt/forfiles.html

This technique can be used for other database dumps such as MySQL, Microsoft SQL Server, QuickBooks, etc.

Dec 052018

We highly recommend using CrashPlan Pro as part of your disaster recovery plan.  After seeding your initial backup, it continuously backs up changed files every 15 minutes.  You get unlimited storage and customizeable file versioning and retention.  For example, let’s say you accidentally delete a file and don’t notice it for say 9 months.  No problem, you’ll be able to restore it using default retention policies.

In some scenarios with some users, we occasionally see the CrashPlan service hang.  Sometimes this occurs after an automatic software update.  In most cases, a restart of the CrashPlan service fixes the issue.  The user could also reboot their computer, but that takes time and is often inconvenient.

We recently had a customer who would need to restart the service every 2-3 weeks.  We did a clean re-install with no improvement.  This computer is used by a heavy internet user with lots of installed software that may be conflicting with the proper running of CrashPlan at times.  Instead of getting on the machine and restarting the service every 2-3 weeks, we made a scheduled task to restart the service every 3 days.

Here’s how to do it:

(1) Open Notepad, enter the following, and save as “CrashPlan Restart.bat” (or similar).

net stop CrashPlanService
net start CrashPlanService

(2)  Open Task Scheduler and schedule running this batch script as a task. We scheduled our job to run at 11:15 PM every 3 days.

crashplan restart scheduled task

(3) Change the CrashPlan Backup Schedule to not run when you’ll be restarting the service.  You might also want to change the file verification scan to run when the backup resumes.  In our case, we set the file verification scan to run at 12:00 AM.  For more information, see Update file verification scan schedule

Since we’ve started running this script, we haven’t received any alerts that CrashPlan stopped working on this user’s computer.  It would be nice if CrashPlan added a Watchdog to restart the service if it stops responding.  Until then, we’ll use this little hack when necessary.


 Posted by at 3:41 pm