How to backup files in Windows 10 using tar.exe

Using the tar.exe tool in Windows, you can back up your files in zip format and upload them to the cloud or make a copy of those files to another HDD or SSD that you use for backups. This is an excellent way for small businesses to keep back-up for their data, but it is also great for personal backups.

Using tar.exe and Task Scheduler you can automatically backup your files and folders into zip archives. To set up a file backup environment in Windows 10 you need the following:

  • A Windows 10 computer with at least OS build no. 17063 because tar.exe was added starting with this version
  • Create a batch file with the script that archives the files
  • Use the Task Scheduler to create a task to automate file archiving

Create your own free backup tool using tar.exe and .bat files

Tar.exe is available in Windows 10 starting with build 17063. Using tar.exe you can create backups for any file and folders that you need and you can choose how to back them up according to your needs. This is a free solution to automatically back-up your files in Windows 10.

Backups can be named according to the date they were created in case you need to keep track of older files so you can configure the script to create daily backups.

After the script was created, you can use the task scheduler to run it when you need it. This way you can create daily, weekly or monthly backups easily.

If you don’t want to keep backup files in chronological order for each day, month or week, you can create a single archive that includes the files you want to backup and replace using the same zip archive name.

How to archive files using tar.exe tool for Windows 10 (starting with build no. 17063)

Use tar.exe to create zip archives for the folders you want to back up. In order to do that, you have to create a .bat file with a script that uses the tar.exe tool to archive the folders to any location you need.

All the tools needed to create the backups are included by default in Windows 10. You can use the default Windows tar.exe tool or you can use a third party application like 7zip or WinRAR.

In this example we`ll use tar.exe as it comes with Windows 10 by default starting with build no. 17063.

1. Create a batch (.bat) file with a script that uses tar.exe to create archives for the files you want to back-up. To do that, open Notepad and create a new and empty .bat file like this: Click File > Save as > backup.bat

2. On Local Disk C, create two folders and name them 1 and 2

3. Add this script to the newly create batch file and save it:

@echo off
tar.exe -a -cf "C:\%DATE:~0,4%%DATE:~4,2%%DATE:~-4%backup.zip" "C:\1" "C:\2"

4. Right click on backup.bat and select “Run as administrator”. After you run the .bat file, a zip archive will be created with the name dd.mm.yy-back-up.zip

This script works like this:

On Local Disk C, tar.exe creates an archive named dd.mm.yy-back-up.zip that includes folder 1 and folder 2 located on the same Local Disk C.

5. Use Task Scheduler to run the script whenever you need it. You can run it daily, monthly or weekly, the files will be saved chronologically and will be named with the date they are created.

6. Set the Google Drive app to upload your archives to Google Cloud to keep your backups safe