samba, rsync, rdiff

sometimes my backups are not consistent. rsync / samba to blame?

some of my backups go as follows:

windows scheduled job backups data to linux via rdiff / rsync [ depending on the case ].
if needed linux runs rdiff to create backup of the data
rsync [run on few machines ] copies the data to it’s final destination
consistency of data is checked again with rdiff –verify

from time to time i’ve been getting inconsistent backups [good to know before you need to recover!] and i’ve been searching for the cause. apparently sometimes files do not change in size and their modify date stays same, yet change date differs:

host:/root# stat "/mnt/backup/file.xls"
  File: `/mnt/backup/file.xls'
  Size: 176640          Blocks: 360        IO Block: 4096   regular file
Device: 80ah/2058d      Inode: 36814865    Links: 1
Access: (0666/-rw-rw-rw-)  Uid: ( 1019/ninja-szctapp0)   Gid: ( 1019/ninja-stoback0)
Access: 2010-06-15 08:39:26.000000000 +0000
Modify: 2010-03-24 08:11:59.000000000 +0000
Change: 2010-06-09 09:44:53.000000000 +0000
host:/root# stat "/mnt/external/file.xls"
  File: `/mnt/external/file.xls'
  Size: 176640          Blocks: 360        IO Block: 4096   regular file
Device: 700h/1792d      Inode: 30466647    Links: 1
Access: (0666/-rw-rw-rw-)  Uid: ( 1019/ninja-szctapp0)   Gid: ( 1019/ninja-stoback0)
Access: 2010-04-05 18:16:41.000000000 +0000
Modify: 2010-03-24 08:11:59.000000000 +0000
Change: 2010-04-05 18:16:41.000000000 +0000

so i’ve put in samba config in each share section

dos filetimes = Yes 

naively thinking it’ll sort my problems. we will see. alternatively i can use –checksum option of rsync but that will slow backup process quite significantly.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

(Spamcheck Enabled)