In this article, we will see how to backup files and folders to a computer on the network.
The backup will be based on Windows file and folder sharing. and will be done during session opening.
The goal is therefore to set up a copy of folders / files to a Backup share on another Windows computer.
The Backup destination folder will contain 5 folders from 1 to 5, it is a rotation of backups that allows you to go back to 5 backups.
Create the Windows share
As a reminder, there is a Network and Homegroup Sharing tutorial that explains how to configure Windows computers within a local network to share files and folders.
Here, we are going to make it extremely simple, for it to work, we must:
- Create the same pair of user / password on both Windows, the source one and the one that will receive the backup.
- Share the backup folder to make it accessible from the source computer.
To create the users on both Windows, you can follow this tutorial: Windows users operation
To go fast, you can also use the netplwiz utility: netplwiz – create a user quickly
In this tutorial, I will use the user malekalmorte, but you can create a backup user, with a valid password.
The netplwiz utility can even prevent password changes to ensure that it remains consistent between the two computers.
Then create the backup folder, for example C: Backup or in another partition with a larger disk.
Right click then Properties on the Backups folder and Share tab.
In authorization you have everyone, Delete it.
Click Add and enter the username you created on both computers.
Click OK and check Allow on the Modify line to have write rights on the Windows share.
Then go to the Security tab, to do the same. Click Modify then Add.
Enter the username, and check Allow on the Edit line to have write rights.
From the source computer, try to list and open the Backup share.
You can go through the menu Network> your computer and normally the Backup share should appear.
It is also possible to type directly in the address bar: \ computername Backup
Reminder, to view the computer name:
- On Windows XP, Vista and Seven: right click on My Computer then Properties
- On Windows 8.1 and Windows 10: right-click on the Start menu then System.
The computer name appears in the system properties.
and hop sharing opens.
If a username / password is requested, it is very likely that the username / password pair on the two computers is different.
Make sure that two users with the same password exist on both computers.
Prepare for backup
The share to host your backups is ready and running from the source computer.
We will now be able to prepare the scripts that will perform the backups.
- Create a backup folder in your documents for example.
- Download this file: Backup_Lan.zip
- Unzip the contents in the folder.
Two files will be created in this folder.
- Backup.txt which will contain the list of folders and files that you want to back up.
- Save.cmd which will contain the backup script. It is this script that will have to be executed for the backups to be carried out with the folders listed in Backupe.txt
Example of Backupe.txt content
Delete and copy / paste the full paths of your folders.
Then, you have to modify the path in the « set destination » part.
The easiest way is to access the share and copy / paste the full path which is in the address bar.
Save the changes.
From there, if you double-click the Save.cmd file, you should have your folders and files copied to the Backup folder on the remote computer on your local network.
Everything is ready, all that remains is to automate the backup.
Either at a fixed time or when starting the computer.
For this, we are going to use Windows scheduled tasks.
To open scheduled tasks,
- on your keyboard, press Windows key + R
- enter taskschd.msc and OK.
Go to the top left on Task Scheduler Library.
Right click on the main window and then click Create a basic task.
Enter the name of the backup.
Click on the Next button.The trigger must then be configured.
We will choose « when starting the computer« so that the backup runs when Windows starts.
You can also choose every day by entering a fixed time.
Select the menu « Start a program« then click on the Next button.
We must then go and find our Sauve.cmd file
To do this, click on the button Browse.
Navigate through your folders to find the Save and Save.cmd folder
You must also indicate the path of the script in the field Start in
For example, if the script is C: Backup Save.cmd
In the Start in field, you must have C: Backup
Click on following.
A summary is displayed, check the option at the bottom « Open the properties of this task when I click on Finish« .
Then click on the button Finish.
In the properties window of the scheduled task.
Check the option « Executed even if the user is not logged in« .
The User or group button lets you choose the user who will be used to run the scheduled task.
In any case, if you click OK, you will be prompted for a username / password.
It is imperative that the scheduled task is executed with the user that you have configured on the two computers which is used to access the backup share. Otherwise the scheduled task will not have access to the share.
Click on the button if necessary to indicate the correct user and his password.
It is necessary to check the good functioning of the backups and this from time to time.
On the scheduled tasks side, you can start it manually by right-clicking then Run.
This one passes In progress, this may take longer or shorter depending on the volume of data to be copied.
Once finished, check that the status is « operation was successful« . and especially the Backup folder which is on the destination Windows …
Check the contents of folder 01, the last backup. If it is empty, it means that the backup is not working.
Check the dates of the files too.
If the files / folders are empty in folder 01, check the properties of the scheduled task
Actions tab and double click on the startup script.
Make sure that in the Start In field, you have correctly indicated the folder where the Sauve.cmd script is located as explained above.
Other more sophisticated backups exist and are listed on the menu: Windows Backup
In particular, Windows offers a document saving system: Windows 8/10: saving personal documents
You found this article useful and interesting, do not hesitate to share it …
Find the solution on the help forum
You have reached the end of the article Back up files to a computer on the network but you did not find the solution to your problem …
Follow these forum articles to find an answer or ask your turn for help on the forum