I am trying to use rsync to make a copy of all the changed files on the laptop's hard drive, and back up those changed files onto two separate USB drives. I use two identical scripts to do this. The 1st script works just fine on the 1st USB. The 2nd script, identical to the 1st except for the target USB name, is supposed to copy the changed files on the hard drive to the 2nd USB.
To allow the files on the USB drives to be read in Windows as well as Linux, the USB drives are formatted as FAT32. Both of the USB drives are identical SanDisk 32 GB USB drives, which have plenty of room for the files that I am backing up. I know that FAT32 is limited to 4 GB per file, but none of the source files that I am backing up is anywhere close to that size.
Here is the code for the 1st USB backup script:
Code:
rsync -vtrlptgoD --modify-window=2 --exclude={'*.iso','/home/len/Downloads','/home/len/Desktop'} /home/len/* "/media/len/DRIVE F"
And here is the code for the 2nd USB backup script:
Code:
rsync -vtrlptgoD --modify-window=2 --exclude={'*.iso','/home/len/Downloads','/home/len/Desktop'} /home/len/* "/media/len/DRIVE D"
I have tried a number of different options for rsync in these scripts:
rsync -avtu
AND
rsync -cu
These options work in the 1st script, but in the 2nd script the changed file is not copied to the 2nd USB.
This is how I test to see if changed files are being copied:
1) Add a new file to the laptop's hard drive
2) Enter some data into the new file
3) Save the new file
4) Execute the 1st script, which backs up the changed file on the hard drive to the 1st USB
5) Check to make sure the new file got copied to the 1st USB
6) Execute the 2nd script, which is supposed to back up the changed file on the hard drive to the 2nd USB
7) Check to make sure the new file got copied to the 2nd USB (but of course it does NOT get copied)
It appears to me that rsync marks any files it copies with the 1st script as "archived". It may be changing some kind of archive bit, which is what happens when you archive files under Windows. I have tried to see if there is some kind of archive bit in Linux, but I can't see any evidence of it, other than the fact that my second attempt to back up the changed file fails.
Please guide me and show me what I'm doing wrong. Perhaps there is a special option in rsync which will prevent it from changing the archive bit on a file which has been changed and is ready to be backed up. If I can find a way to do that, the 2nd script should work, copying the changed file to the 2nd USB. Thanks.
To allow the files on the USB drives to be read in Windows as well as Linux, the USB drives are formatted as FAT32. Both of the USB drives are identical SanDisk 32 GB USB drives, which have plenty of room for the files that I am backing up. I know that FAT32 is limited to 4 GB per file, but none of the source files that I am backing up is anywhere close to that size.
Here is the code for the 1st USB backup script:
Code:
rsync -vtrlptgoD --modify-window=2 --exclude={'*.iso','/home/len/Downloads','/home/len/Desktop'} /home/len/* "/media/len/DRIVE F"
And here is the code for the 2nd USB backup script:
Code:
rsync -vtrlptgoD --modify-window=2 --exclude={'*.iso','/home/len/Downloads','/home/len/Desktop'} /home/len/* "/media/len/DRIVE D"
I have tried a number of different options for rsync in these scripts:
rsync -avtu
AND
rsync -cu
These options work in the 1st script, but in the 2nd script the changed file is not copied to the 2nd USB.
This is how I test to see if changed files are being copied:
1) Add a new file to the laptop's hard drive
2) Enter some data into the new file
3) Save the new file
4) Execute the 1st script, which backs up the changed file on the hard drive to the 1st USB
5) Check to make sure the new file got copied to the 1st USB
6) Execute the 2nd script, which is supposed to back up the changed file on the hard drive to the 2nd USB
7) Check to make sure the new file got copied to the 2nd USB (but of course it does NOT get copied)
It appears to me that rsync marks any files it copies with the 1st script as "archived". It may be changing some kind of archive bit, which is what happens when you archive files under Windows. I have tried to see if there is some kind of archive bit in Linux, but I can't see any evidence of it, other than the fact that my second attempt to back up the changed file fails.
Please guide me and show me what I'm doing wrong. Perhaps there is a special option in rsync which will prevent it from changing the archive bit on a file which has been changed and is ready to be backed up. If I can find a way to do that, the 2nd script should work, copying the changed file to the 2nd USB. Thanks.