Jump to content

Backing up specific drives/folders to a local server

Mjjmk

Hey guys,

 

I've looked into a few different programs for the situation i have here, but none of them seem to integrate well into Windows, or are too "heavy" of a program.

 

What I'm trying to do:

I have a photography business and do videography on the side. With all the projects I have, it takes up a lot of space. I need more space and redundancy, so my 

hope is to have JBOD on my main computer and a raid 1 on my server, with one drive set up to offload the data to the server every night and clear itself. 

The reason I want this is because I just suck at remembering to back up, plenty of the things in my storage need a fast write speed but not read, and losing

the data could mean losing money. Plus, the MOBO on my main PC doesn't have enough sata ports for the data req's (it's a LOT of data)

 

My server is a hackintosh with dual boot for Win 10, so either OS would work for me. I assume windows would be more likely, but I wont be able to do another OS 

since I run a Plex server on it and it also serves as a gaming PC when a friend comes over.

 

Sorry this is so complicated, just thought this forum would be the first place i should look.

 

Thanks!!!

Link to comment
Share on other sites

Link to post
Share on other sites

I have been using the free version of SyncBack from 2brightsparks to keep a backup of specific folders of a pc in an external drive.  

 

It's been working great for several years, but I dont remember if it has an option to delete the files in the source folder after copying them.

 

To use a server as backup unit I guess all you need to do is map the network drive in your system and it should work fine.

Mystery is the source of all true science.

 

Link to comment
Share on other sites

Link to post
Share on other sites

An alternative method for drive/file backup that I would suggest would be the use of 'RoboCopy'. All robocoby is, is a MS-DOS (Windows Cmd etc) command which, if my memory is correct stands for Robust Copy. It can allow you to do pretty much all you would want to do in terms of drive/file backup. I must emphasize that you would need some, preferably a high knowledge of how batch files, dos commands and task scheduler works. Look on Microsoft's form page  for the list of robocopy  variables. It's not too hard to set up in a localized system, but the difficulty would really depend on what your needs and uses are. 

Because robocopy is intergrated into the windows platform you could consider it a 'light' application or whatever you want to call it.

 

PS. It's free :)

Link to comment
Share on other sites

Link to post
Share on other sites

20 hours ago, VegetableStu said:

any idea how do I tell it to find files that are deleted on the source folder and move the backup into another folder? o_o I'm this step away from actually preparing to implement stuff for real o_o

I'm not to sure but the /MIR can do what you might wan't.

 

I'm sort of confused by the way you have put it but I'm thinking you mean that you want it to constantly backup the files to another destination so that if the source is deleted you still have the backup. There is many different ways you could set this up.

One way of doing this with 'Robocopy', you will need to: 

  1. setup a .bat file.
  2. Use the following commands:
@ECHO OFF
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
set WD=%%i
set D=%%j
set M=%%k
set Y=%%l
) 

for /F "tokens=1-4 delims=: " %%i in ('time /t') do (
set H=%%i
set Mn=%%j
set AP=%%k
)

if "%AP%"=="PM" set /A H=%H%+12

mkdir X:\"%Y%"\"%M%"\"%D%-%WD%"\
robocopy X:\<LOCATION OF BACKUP>\    X:\<DESTINATION OF BACKUP>\%Y%\%M%\%D%-%WD%\    /MIR /R:5 /W:7 /MT:128 /LOG:FILEBackup.log

This will create a folder with the year and date if it doesn't exist. In that folder it will copy the source into the destination. Note that this script doesn't delete files/folders so if you wanted to delete older backups you would need add that to the script. If it cannot backup a file it will retry 5 times with 7 second intervals. It will use 128 threads (not CPU threads) to copy the files. Finally it will create a log file on your desktop called 'FILEBackup.log'.

 

If you want to change the amount of threads being used, you can lower the number (The max threads is 128). MORE THREADS = FASTER BACKUP

If you are going to use more threads it would be more ideal to do it at a time when you are not using your PC.

 

If you set this script to run once a day --> ON SEPARATE DAYS       /MIR wont delete files that are doesn't exist in the source because new directory folders would be created at the destination. MAKE SURE THE BACKUP DOES NOT CONTINUE OVER MULTIPLE DAYS   ---> 11:59 PM Mon to 1:00 AM Tues. This will muck up the backup.

Make sure that on task scheduler that the 'restart setting' is unchecked because it may also muck up the backup if it restarts then carries over to another day.

 

Once you have finished with the script set a schedule in task scheduler to run the bat file once a day. Make it run hidden so it doesn't interfere with your work if you are doing any work.

 

With this method you will be able to have accurate timestamps of when each backup occurred, so if something goes wrong you could go to a specific day to recover certain files. The only downside to this method of using robocopy is that you will kill all your spare storage if you backup whole drives.

 

Note: Robocopy cannot copy files with certain 'special permissions'.

 

I would suggest testing this script because i just whipped it up and haven't had enough time to test it.

 

I hope this helps and that I made sense :) 

 

Link to comment
Share on other sites

Link to post
Share on other sites

On 03/08/2018 at 12:27 AM, VegetableStu said:

hey thanks for the writeup, sorry for being a bit vague earlier, I'm looking to do a simple Backup folder A to folder B, if item in B does not exist in A (implies item is deleted), move item and its folder hierachy to location C

 

was expecting robocopy to have such a command flag, but looks like a bit more programming is required after all. thanks!

so you are saying B is the origin, A is the backup location, so if B is not in A because B has been 'deleted', re-backup B to folder C? or backup B back to A?

 

Yeah robocopy can be a bit difficult at times but I guess thats just the fun with doing the work yourself and having that sense of accomplishment. 9_9

Link to comment
Share on other sites

Link to post
Share on other sites

Totally forgot about robocopy. Thanks for the help guys! I'll post the files/tasks if I get it to work the way I want it to. 

 

Thanks!!!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×