AdamTheTech Logo
AdamTheTech
Enthusiast of Technology, Web Development, and Sci-Fi

Microsoft’s Free Virtual Machine Images

Deus Ex: Human Revolution Review

Embed dll Files Within an exe (C# WinForms)

Create a Simple Backup System: Part III – Automating the Backup

Please be aware that this entry is over two years old. Therefore, it may contain broken links, outdated information, or views and content which are no longer completely valid.

Scheduling an automatic backup will be the last step in this series of the Simple Backup System (be sure to take a look at Part I and Part II before diving into this one).

Through the course of both articles, in order to perform a backup, you have needed to do it manually.  The downside to this?  You have to remember to actually do a backup.

So, what we’re going to do here now is a “set it, and forget it” kind of deal where stick the “full_backup.bat” batch file into Windows Task Scheduler.   The first thing to make sure of is if this service has been disabled or not.  To enable it, go to “Start” > “Run” > and type: services.msc

Look for an item named “Task Scheduler”.  Right click on it and click “Properties”.  Set the “Startup type” dropdown menu to “Automatic” and click the button labeled “Start” (if it isn’t already grayed out).  Hit OK and close the services window.

Now, here’s where the real magic begins.  Go to the Control Panel and open up “Scheduled Tasks”.  In the new window, double click on “Add Scheduled Task”.  You should be presented with a wizard.  Hit “Next”, and in the next screen, hit “Browse” to locate your “full_backup.bat” file.

On the next screen, you can choose how often to perform the backup.  Since the directories I backup using this method change daily, I schedule daily backups.  If you don’t wish to do daily backups, I would suggest either weekly or monthly (but encourage you to go weekly).  Hit “Next” when you’re done.

Selecting a time to do the backup is next.  It should be fairly self-explanatory.  Pick a time during the day (or night) for the backups to run.  If you keep your computer on all night, just simply schedule an hour when you know you’re not going to be using your computer.  Anywhere between 3AM to 5AM is usually a safe bet.  If you only have your computer on during the day, schedule the backup during lunch or dinner.  Hit “Next” when you’re done.

The next step is fairly important.  If your computer is not password protected, you can leave everything as-is here.  If it is password protected, for “user name”, enter the name of your computer, followed by a backslash and the username “Administrator”.  If you don’t know what the computer name is, right click on “My Computer”, click “Properties”, and click on the “Computer Name” tab.  You should see the name labeled with “Full computer name”.  So, here’s what you need to type:

ComputerName\Administrator

Now, just type in the password for the Administrator account in the password fields.  Hit “Next” and, finally, “Finish”.  Your automated backup should now be set!  To verify that it runs after a scheduled time, just open up “Scheduled Tasks” again and look under the “Last Run Time” column.

(Originally published on a now-defunct blog)