I’m trying to backup some folders to my NAS, but I have some doubts about rsync usage.
1- I have two methods of doing it, first is using a SMB mount, thus using
/mnt/folder in the rsync command.
The other method is using the NAS credentials to login,
Either way of doing it, the user in my NAS is not the same that I have in my local system, would any of these methods cause any problems that a
chown -R couldn’t fix later once I restore these folders ?
2- I want to sync folders exactly as they are, removing any files in the destination that doesn’t exist in the source folder, would this be a good option for it ?
rsync -rva --delete local_folder /mnt/destination_folder or user@nas:/volume1/destination_folder be enough, or any other options that I could include in this rsync command ?
r as recursive to copy folders too.
v for verbose.
a to keep metadata.
–delete to erase files in the destination folder that doesn’t exist in the local folder.
Any help is much appreciated, started with rsync today.