dotNetTips.DevBackup Utility

The dotNetTips.DevBackup is a console tool that will quickly backup your Visual Studio code files. I wrote this app to backup source files before retrieving source from source control and at the end of the day.

Note: It’s recommended to close all instances of Visual Studio before running this app. This app will also stop IIS and SQL Server before backup begins and start them again at the end.

Configuration

This app is very configurable via the C:\Users\<user>\AppData\Local\dotNetTips.com\ dotNetTips.DevBackup.config file that is created the first time this app runs. The default settings are:

  • BackupFolder (set at first run): This is the folder where backup files will be copied to. At first run, if a “c:\users\<user>\OneDrive\Backup” folder will be set if exists or the “C:\Users\<user>\AppData\Local\dotNetTips\Backup” folder will be set. This can be changed if needed.
  • DaysToKeep (7): The app will delete any backup folders after the number of days in this setting. Minimum value is 1 day.
  • IgnoreFileTypes (set at first run): This is a comma delimited list of file extensions to not backup. These are automatically set when the app first runs. You may edit this list as you see fit.
  • IgnorePaths (set at first run): This is a comma delimited list of folder paths to ignore. You may edit this list as you see fit.
  • Speak (true): The app will speak important formation on what it is backing up.

Backup Folders

This app will automatically add the following folders to be backed up:

  • <drive>\Development
  • C:\users\<user>\Documents\Visual Studio <version>\Projects

You can edit or add any other folders to this list. Here is an example:

<BackupFolders>
    <Folder Path="C:\Source" />
</BackupFolders>

Errors

If there are any errors deleting copying files, they will be listed in the C:\Users\<user>\AppData\Local\dotNetTips.com\dotNetTips.DevBackup.Errors.txt file. This will also stop the automatic closing of the command window .

Download

Download the app here: http://bit.ly/dotNetBackup

Requirements

  • Microsoft .NET Framework 4.7.1

Note: Use at your own risk. If you run into any issues or have ideas for this app, please leave a comment.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.