Backing up files... Hassle no more!
- FraserJamesH
- May 7, 2020
- 4 min read
****This blog post is about backing up all the files for any assets etc for the game NOT the Unity Project, this is backed up using GitHub to a private repository.****
I bought an external hard drive a while ago and felt that I could be using it a lot more efficiently. A lot of people just manually move files over they want to backup but when working on a project like that, that can be a BIG hassle. With lots of files in different folders I went on a hunt to find a better solution to backing them up.
Backing up to a cloud based system was out of the window here because I already has a 2 Terabyte external hard drive that I din't want to have to rely on the internet to backup files, especially as my internet speed can vary. I first found the windows backup system built into windows 10. While working great for simple backups of family photos it wouldn't work for the solution I needed. This is when I found out about SyncToy. SyncToy uses a left to right based system in which you set a folder location on one hard drive (Left) and then another on a other drive (Right), then set how you want them to backup. There is a couple of methods you can choose from but I chose Synchronise which means that whatever is in one folder it will also be copied to the other. So if I make a change to the external hard drive folder it will sync it to the main hard drive folder and vice verse. You can set as many folders you want it to do this to which is great because I don't have to keep the same folder structure on both drives. I then set this sync up to a taskbar shortcut so I can sync the drives whenever I want.
A key note to remember is that you cant sync whilst using a file, so if you have 3DS MAX open and want to sync the file to both drives then you would need to close 3DS MAX. This isn't a major issue for me though as I like to have control over when I sync the files and usually do it whenever I take a break or am finished for the day. You can set it to be automatic and do it at a certain time however having control over when the sync is made helps me keep track of what I have done. Creating this shortcut however does take time but 100% worth doing if you don't want to have to open the software all the time and want it one click away.
I have included a tutorial with links on how to set up the shortcut for SyncToy using the windows Task Scheduler:
SyncToy: > https://www.microsoft.com/en-gb/download/details.aspx?id=15155
This tutorial is for setting up the Task Scheduler so you can run SyncToy as a shortcut instead of through the software.
Links: https://www.howtogeek.com/howto/25046/schedule-synctoy-to-run-automatically-with-task-scheduler-in-windows-7/
Links 2: https://superuser.com/questions/57694/setting-a-shortcut-to-trigger-task-scheduler
Setting up the Task Scheduler:
1.In Windows 10, Windows Key -> Windows Administrator Tools -> Task Scheduler.
2.Click on Create Basic Task in the “Actions” panel on the right.
3.In the “Create Basic Task Wizard”, type in a Name and Description. For example, SyncToy Synchronization.
4.Click on Next button.
5.Choose the frequency of when do you want the task to start. If you always make changes to the files, Daily is a good choice. This isn't the only time you can backup however, this is just the basic backup that is automatically done.
6.Click on Next button.
7.Choose date and times (if applicable) to trigger and run the task.
8.Click on Next button.
9.In the “Action” step, select Start a Program as the option for the task to perform.
10.Click on Next button.
11.Under “Program/Script”, click on Browse button and locate the SyncToyCmd.exe. Normally it’s located in “C:\Program Files\SyncToy 2.0 Beta\SyncToyCmd.exe”.
11.In the “Add Arguments” text box, type -R. –R will run all folder pairs that are active for run all. If you want to run just a single folder pair, add –R”folder pair name” to the end of the command line.
Note: there is a space before the hyphen but not one after the R. If the folder pair name contains a space, surround it with quotation marks, as the example above shows. For another example, assume that SyncToy is in the folder named C:\Program Files\SyncToy 2.0\ and that you want to run a folder pair named “My folder pair.” Enter the command line as follows, including the quotation marks: “C:\Program Files\SyncToy 2.0\SyncToyCmd.exe” -R”My folder pair.” Note that there are two sets of quotation marks in this case: one is around the path to the SyncToy program file and the other surrounds the folder pair name.
Creating a Shortcut:
1.Right-click an empty spot on your Desktop and select New > Shortcut. In the Create Shortcut window enter the following text:
C:\Windows\System32\schtasks.exe /run /tn "TaskName"
Whenever you want to run the specified program, simply double-click on the shortcut you've created without requiring UAC prompts or complete Administrator access.
You can also further customise the shortcut with an icon or other settings if you wish, I find that it is very useful if you do.
Yorumlar