# Automatic backups script for Windows

**URL:** <https://forum.manager.io/t/automatic-backups-script-for-windows/11697>\
**Category:** Uncategorized\
**Created:** [September 13, 2017, 1:15pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697 "2017-09-13T13:15:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharpdrivetek](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/sharpdrivetek/32/34244_2.png) [@sharpdrivetek](https://forum.manager.io/u/sharpdrivetek)\
**Post date:** [September 13, 2017, 1:15pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/1 "2017-09-13T13:15:14Z")

</div>

This information is for those users who wish to automate their Manager data backup.

Windows users can follow this guide.  
(The images shown in this guide are from Windows 10 Pro - 64bit OS. So it may vary a bit for other Windows editions)

Part 1 - The first step is to create a script that will automatically backup your business data.

1. Open Notepad and copy the following script.

> ```
> echo off
> for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a
> set YYYY=%dt:~0,4%
> set MM=%dt:~4,2%
> set DD=%dt:~6,2%
> set HH=%dt:~8,2%
> set Min=%dt:~10,2%
> set Sec=%dt:~12,2%
> set stamp=ManagerBackup_%DD%%MM%%YYYY%@%HH%%Min%
> mkdir %stamp%
> cd %stamp%
> xcopy "Your_Manager_Application_Data_Location\*.*" /s
> 
> ```

1. In the above code replace _Your\_Manager\_Application\_Data\_Location_ with the location to your Manager application data folder. If you had not change the application data folder, the default location will be _C:\Users\Username\AppData\Local\Manager_

2. Now select Save As option under File menu and select _All Files (.)_ as the type.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/2X/9/9ee45cab712b857a6b4966b595d5ac0f5e6ffc27.png)  
Enter any name as file name with the extension **.bat**

3. It is always a good practice to save backups in a different drive other than the default C drive where windows is installed because if you had to reinstall windows for any reason, you would most probably end up losing the files stored in your C drive. So create a folder in D or E drive say _ManagerBackup_ and move the batch file created in the above step to this folder.

Now running this file will create a backup of your application data folder contents in the newly created backup folder. Each backup will have a timestamp which help in identifying the backup date and time.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/2X/f/f975a55e9732550b47c25c1d0c7fa5347bb87f89.png)

Part 2 - The next step is to make this backup run automatically at any specific interval.

1. In Windows, open the program called **Task Scheduler**. You can find it under Administrative Tools in the Control Panel.

2. On the right side you will find the Actions menu. Select _Create Basic Task_  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/2X/f/f0202062e7c16ab0e465954b90e87ff415adea85.png)

3. Enter a name for this task and select Next.  

4. In the next screen select the option _When the computer starts_. This will trigger the backup process every time your computer starts. Click Next again.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/2X/1/13f418d26d1cd63e12e39243cf8246004e7691d2.png)

5. Select _Start a program_ and click Next.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/2X/e/e18693f5463870290e3036ebf14533b4c3899447.png)

6. Click Browse and select the script created earlier to proceed further.  

7. In the next screen, the summary of selected actions is shown. Check if everything is correct and click Finish.  

Thats it! Now the backup will happen every time you start Windows.

---

<div class="post-metadata">

**Author:** ![ShaneAU](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/shaneau/32/10122_2.png) [@ShaneAU](https://forum.manager.io/u/ShaneAU)\
**Post date:** [September 13, 2017, 1:18pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/2 "2017-09-13T13:18:01Z")

</div>

> [@sharpdrivetek](#):
>
> Thats it! Now the backup will happen **every time you start Windows**.

For me that’s about once every few months! 😆

Thanks for the guide sharpdrivetek. I use Windows often as well, but wasn’t aware of the Task Scheduler’s existence!

---

<div class="post-metadata">

**Author:** ![sharpdrivetek](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/sharpdrivetek/32/34244_2.png) [@sharpdrivetek](https://forum.manager.io/u/sharpdrivetek)\
**Post date:** [September 13, 2017, 1:21pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/3 "2017-09-13T13:21:40Z")

</div>

Once every few months is ok if the user is responsible. Most small business have different people using the same computer and errors can happen. so having a backup of the file before the user even started a Manager session would help revert back easily.

---

<div class="post-metadata">

**Author:** ![acecombat2](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/acecombat2/32/6638_2.png) [@acecombat2](https://forum.manager.io/u/acecombat2)\
**Post date:** [January 14, 2018, 1:42am UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/4 "2018-01-14T01:42:41Z")

</div>

nifty! I hope it works on windows 7 though. It does backup the whole data folder right?

---

<div class="post-metadata">

**Author:** ![sharpdrivetek](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/sharpdrivetek/32/34244_2.png) [@sharpdrivetek](https://forum.manager.io/u/sharpdrivetek)\
**Post date:** [January 14, 2018, 3:49am UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/5 "2018-01-14T03:49:05Z")

</div>

> [@acecombat2](#):
>
> I hope it works on windows 7 though.

Task Scheduler has been a feature on all Windows versions. So it will definitely work on 7.

> [@acecombat2](#):
>
> It does backup the whole data folder right?

yes.

---

<div class="post-metadata">

**Author:** ![dalacor](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@dalacor](https://forum.manager.io/u/dalacor)\
**Post date:** [January 14, 2018, 11:27am UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/6 "2018-01-14T11:27:58Z")

</div>

Most people, if not all people are using Manager to manage a business, thus I would recommend a dedicated backup program for the following reasons:

You need to backup all your data, not just manager!

1. Task Scheduler Backups like this have a major failing in that there is no backup notification. So something could go wrong with the backup causing it to fail and unless you check the logs you would not know for months - usually when you try to restore data. Backup Notification and Backup Restore Verification are very important.

2. What happens if your computer gets hit by a malware virus like Cryptolocker and encrypts all your data? Then your backup in theory could be encrypted as well if its on the same computer or on a network share that the malware could access.

3. End of the World Scenario - what happens if your house/office burns down. If your backup is onsite, you have lost everything. Offsite Backup is vital.

4. Data Protection - Backing up your data offline really requires your backup to be encrypted so that if the server end is hacked, all the data is unreadable.

I thought that I would just raise these points as people unfortunately only come to appreciate a proper backup system only after they have lost data. Most people look at backup as an expense instead of the valuable asset it really is.

---

<div class="post-metadata">

**Author:** ![acecombat2](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/acecombat2/32/6638_2.png) [@acecombat2](https://forum.manager.io/u/acecombat2)\
**Post date:** [January 14, 2018, 11:35am UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/7 "2018-01-14T11:35:14Z")

</div>

I concur, Currently before @sharpdrivetek shared his practices, I’m using syncthing combo with cloud storage sync folder. the only Issue I have the syncthing keeps sync used file ended generate extra copy of incomplete file lol. have to delete once a while.

---

<div class="post-metadata">

**Author:** ![sharpdrivetek](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/sharpdrivetek/32/34244_2.png) [@sharpdrivetek](https://forum.manager.io/u/sharpdrivetek)\
**Post date:** [January 14, 2018, 11:56am UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/8 "2018-01-14T11:56:29Z")

</div>

For additional security you can download _Backup and Sync_ program from google and sync the backup folder created in my above post to your google drive account.  
this will help you have a copy of you backups in your Google drive too.  
as long as both the user computer and google servers do not burn down simultaneously, your business data will be safe.

@acecombat2 you can follow this too since you run a server.

---

<div class="post-metadata">

**Author:** ![acecombat2](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/acecombat2/32/6638_2.png) [@acecombat2](https://forum.manager.io/u/acecombat2)\
**Post date:** [January 14, 2018, 12:36pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/9 "2018-01-14T12:36:06Z")

</div>

> [@sharpdrivetek](#):
>
> For additional security you can download _Backup and Sync_ program from google and sync the backup folder created in my above post to your google drive account.  
> this will help you have a copy of you backups in your Google drive too.  
> as long as both the user computer and google servers do not burn down simultaneously, your business data will be safe.
> 
> @acecombat2 you can follow this too since you run a server.

This is like triple backup, talk about paranoia. 🤣 @sharpdrivetek check ‘syncthing’ out you understand what it means paranoia.

---

<div class="post-metadata">

**Author:** ![mohd.irfan.qhd](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/mohd.irfan.qhd/32/40358_2.png) [@mohd.irfan.qhd](https://forum.manager.io/u/mohd.irfan.qhd)\
**Post date:** [March 26, 2018, 4:12pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/10 "2018-03-26T16:12:10Z")

</div>

We are using Server version of the Manager.  
From the Script I understand that the file at location "C:\Users\Username\AppData\Local\Manager " is being copied to the Folder having the Batch file.  
But is the restore procedure for these files the same as the standard procedure.  
I tried generating Backup with standard procedure. I then compared the size of that backup file with the one at location “C:\Users\Username\AppData\Local\Manager”. There is a big difference. The Backup file is 396KB and this file is only 28KB.  
Please clarify.

---

<div class="post-metadata">

**Author:** ![sharpdrivetek](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/sharpdrivetek/32/34244_2.png) [@sharpdrivetek](https://forum.manager.io/u/sharpdrivetek)\
**Post date:** [March 26, 2018, 4:26pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/11 "2018-03-26T16:26:55Z")

</div>

the backup method described in this topic is copying the whole application data folder.  
the application data folder contains all the separate business files and other database files.  
so when restoring, you will have to identify the business data file from the backup folder and import it to Manager.

the normal backup procedure within Manager will only backup the current business data. this has to be imported to Manager as described in the guides.

---

<div class="post-metadata">

**Author:** ![mohd.irfan.qhd](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/mohd.irfan.qhd/32/40358_2.png) [@mohd.irfan.qhd](https://forum.manager.io/u/mohd.irfan.qhd)\
**Post date:** [March 26, 2018, 5:03pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/12 "2018-03-26T17:03:06Z")

</div>

I understand.  
But in our case there is only one file at location C:\Users\Username\AppData\Local\Manager" named as “00000000000000000000000000000000.manager” whose size is 28 KB.  
And the size of the downloaded and saved file with regular /standard Back up procedure is bigger, that is 396 KB.  
That is why I am confused. Please guide.  
Want to mention again that it is Server version of Manager running on Windows 10 Pro - 64bit OS. And we have only one business created.

---

<div class="post-metadata">

**Author:** ![Tut](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/tut/32/3286_2.png) [@Tut](https://forum.manager.io/u/Tut)\
**Post date:** [March 26, 2018, 5:09pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/13 "2018-03-26T17:09:47Z")

</div>

The file you referenced is an index file. It contains no accounting data. 28KB is its default size and probably won’t change unless you open several businesses. For more understanding about data file names and storage schemes, read this Guide: [Manager Cloud](https://guides.manager.io/8394).

---

<div class="post-metadata">

**Author:** ![sharpdrivetek](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/sharpdrivetek/32/34244_2.png) [@sharpdrivetek](https://forum.manager.io/u/sharpdrivetek)\
**Post date:** [March 26, 2018, 5:17pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/14 "2018-03-26T17:17:56Z")

</div>

This probably means you have set a different folder for your application data. If you are not the administrator, i would recommend you to contact the relevant person who installed the Manager server for you.

---

<div class="post-metadata">

**Author:** ![mohd.irfan.qhd](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/mohd.irfan.qhd/32/40358_2.png) [@mohd.irfan.qhd](https://forum.manager.io/u/mohd.irfan.qhd)\
**Post date:** [March 26, 2018, 5:23pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/15 "2018-03-26T17:23:13Z")

</div>

I installed Manager myself and I am logged in as Administrator.

I tried to Search " \*.manager " files on my computer but could not find except “00000000000000000000000000000000.manager” on above location, it was only 28 KB and modified date was older, probably the day I installed Manager.

And there is no Folder location showed on Preferences page in Manager.

---

<div class="post-metadata">

**Author:** ![sharpdrivetek](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/sharpdrivetek/32/34244_2.png) [@sharpdrivetek](https://forum.manager.io/u/sharpdrivetek)\
**Post date:** [March 26, 2018, 5:25pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/16 "2018-03-26T17:25:03Z")

</div>

Have you imported the business backup file to Manager?

---

<div class="post-metadata">

**Author:** ![mohd.irfan.qhd](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/mohd.irfan.qhd/32/40358_2.png) [@mohd.irfan.qhd](https://forum.manager.io/u/mohd.irfan.qhd)\
**Post date:** [March 26, 2018, 5:29pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/17 "2018-03-26T17:29:00Z")

</div>

I just now created Backup with regular procedure to compare it with the file in Location C:\Users\Username\AppData\Local\Manager , did not try importing it.

---

<div class="post-metadata">

**Author:** ![sharpdrivetek](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/sharpdrivetek/32/34244_2.png) [@sharpdrivetek](https://forum.manager.io/u/sharpdrivetek)\
**Post date:** [March 26, 2018, 5:31pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/18 "2018-03-26T17:31:34Z")

</div>

Did you do the backup on a different computer?  
Have you imported any business file on the computer you have installed the server edition? If no, first import it.

What folder path do you see on the DOS window when you run ManagerServer.exe ? That will be your application data path.

---

<div class="post-metadata">

**Author:** ![mohd.irfan.qhd](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/mohd.irfan.qhd/32/40358_2.png) [@mohd.irfan.qhd](https://forum.manager.io/u/mohd.irfan.qhd)\
**Post date:** [March 26, 2018, 5:47pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/19 "2018-03-26T17:47:52Z")

</div>

I am actually using nssm to auto start the Manager as a service.  
Let me mention few things that I observed.  
When I tried to run ManagerServer.exe directly (by double clicking it). My whole data disappeared, it was as if there is no data at all.  
What I understand is, the data is stored somewhere else when we use nssm. Can you please help me to find where it could be, and how I can do Automatic Backups.

---

<div class="post-metadata">

**Author:** ![fahood007](https://avatars.discourse-cdn.com/v4/letter/f/ecccb3/32.png) [@fahood007](https://forum.manager.io/u/fahood007)\
**Post date:** [March 26, 2018, 8:42pm UTC](https://forum.manager.io/t/automatic-backups-script-for-windows/11697/20 "2018-03-26T20:42:15Z")

</div>

I would recommend running windows backup would be a fast solution

[Next page](https://forum.manager.io/t/automatic-backups-script-for-windows/11697.md?page=2)
