1. Windows Server 2019
Step
Create a shared file and add a user to access the file.
-D:\Fileshare
-E:\Backup
2. Ubuntu Desktop 22.04.2
Step
2.1 Create 2 Folder for mount file
sudo mkdir /media/user/Fileshare
sudo mkdir /media/user/backup
2.2 Mount file by command
- Fileshare
sudo -S mount -t cifs -w -o username=usewindows -o password=passworduser //192.168.x.xx/fileshare /media/user/Fileshare/
- Backup
sudo -S mount -t cifs -w -o username=usewindows -o password=passworduser //192.168.x.xx/backup /media/user/backup/
2.3 Run test rsync backup withe delete source and then destination follow.
sudo rsync -ahrvz --delete --stats --progress /media/user/Fileshare/ /media/user/backup/