Rsync is copying files that have not changed
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 3
- Posts: 120
- Joined: Fri Apr 12, 2013 4:43 pm
Rsync is copying files that have not changed
This is the command I am using
rsync -avu --delete /source /destinatoin
I only want to update files that have changed and new files and delete non existing files. Yet, everything is getting copied. Takes 5 days.
rsync -avu --delete /source /destinatoin
I only want to update files that have changed and new files and delete non existing files. Yet, everything is getting copied. Takes 5 days.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
- Level 16
- Posts: 6054
- Joined: Mon Aug 27, 2012 10:17 pm
Re: Rsync is copying files that have not changed
That will happen unless both source and destination are mounted on their respective hosts with thelinux_trojan wrote: ⤴Sun Jun 20, 2021 11:18 pm This is the command I am using
rsync -avu --delete /source /destinatoin
I only want to update files that have changed and new files and delete non existing files. Yet, everything is getting copied.
noatime
option in fstab
.-
- Level 3
- Posts: 120
- Joined: Fri Apr 12, 2013 4:43 pm
Re: Rsync is copying files that have not changed
Help me out here. I am not sure what this means.
Source is on my computer. Destination is a network drive that I have mounted, actually on /mnt but as user not root. I have to change the fstab for Source? Its actually two drives in source /dev/sda has /home and sdb is mounted on /home/user/movies
Source is on my computer. Destination is a network drive that I have mounted, actually on /mnt but as user not root. I have to change the fstab for Source? Its actually two drives in source /dev/sda has /home and sdb is mounted on /home/user/movies
-
- Level 3
- Posts: 120
- Joined: Fri Apr 12, 2013 4:43 pm
Re: Rsync is copying files that have not changed
is this what you mean?
in fstab go to my partitions and insert defaults,noatime
then mount //network drive /linux folder -o noatime
in fstab go to my partitions and insert defaults,noatime
then mount //network drive /linux folder -o noatime
Last edited by linux_trojan on Sun Jun 20, 2021 11:48 pm, edited 1 time in total.
-
- Level 16
- Posts: 6054
- Joined: Mon Aug 27, 2012 10:17 pm
Re: Rsync is copying files that have not changed
https://wiki.archlinux.org/title/Fstab
The noatime option fully disables writing file access times to the drive every time you read a file...
-
- Level 3
- Posts: 120
- Joined: Fri Apr 12, 2013 4:43 pm
Re: Rsync is copying files that have not changed
Can you check out my plan for doing this on the previous post? Am I reading you correctly?
-
- Level 3
- Posts: 120
- Joined: Fri Apr 12, 2013 4:43 pm
Re: Rsync is copying files that have not changed
I was able to get the fstab setup I did $sudo mount -a to get it all remounted. I wasnt able to do the sudo mount with -o noatime for the network drive. I get an error.
I have never had this problem before until recently. I think Mint used to come with noatime in fstab by default. Any ways, rsync now is pretty much picking up where it left off last time, which is an improvement. Normally it would just start all over again.
I have never had this problem before until recently. I think Mint used to come with noatime in fstab by default. Any ways, rsync now is pretty much picking up where it left off last time, which is an improvement. Normally it would just start all over again.
Re: Rsync is copying files that have not changed
I'd like to hear more about what changed on the linux_trojan computer. Different OS installed, or perhaps an update??I have never had this problem before until recently. I think Mint used to come with noatime in fstab by default.
-
- Level 3
- Posts: 120
- Joined: Fri Apr 12, 2013 4:43 pm
Re: Rsync is copying files that have not changed
I recently reformatted the drive and reinstalled everything, got everything that I had backed up previously. I was using MX Linux but started having problems. Turns out my HD was all chopped up with partitions that I did not even recognize. So, just stared all over. Repartition, reformat, reinstall, reload /home/user data.
Re: Rsync is copying files that have not changed
Can you give exact syntax of the command you used ? rsync won't have the same behavior depending on an '/' at the end of source or not :linux_trojan wrote: ⤴Sun Jun 20, 2021 11:18 pm This is the command I am using
rsync -avu --delete /source /destinatoin
I only want to update files that have changed and new files and delete non existing files. Yet, everything is getting copied. Takes 5 days.
Code: Select all
rsync -avu --delete /linux/trojan/source /linux/trojan/dest
Code: Select all
rsync -avu --delete /linux/trojan/source/ /linux/trojan/dest
See 3 of the 3888 lines of
man rsync
Also, use -n option (dry-run) to simulate the sync before doing it when you're not sure. It will let you know if your expectancy is matched or not (especially last lines of statistics - if your initial guess is "there are 3 or 4 text files to sync" and the statistics show a 2TB data transfer, something's wrong in your command)A trailing slash on the source changes this behavior to avoid creating an additional directory level
at the destination. You can think of a trailing / on a source as meaning "copy the contents of this
directory" as opposed to "copy the directory by name".
Code: Select all
rsync -avu --delete /linux/trojan/source/ /linux/trojan/dest -n
dual boot LMDE4 (mostly) + LM19.3 Cinnamon (sometimes)