Here's the set up ..
Virtual machine: 'buddy' .. a VM on my Synology NAS
Laptop: 'main' .. my laptop running pop_os
The server: Ubuntu 18.04 .. with the backups. They look like this:
CIFS mount: smb mount on the synology nas .. on ~/synner/
buddy:
main:
Notice some slight differences here .. buddy has 'serverino' and main has 'closetimeo=5'
- serverino: enable the generation of unique file IDs by the server
- closetimeo: not sure
The backup command:
The issue:
When buddy performs the backups at 6am to the CIFS mount, he saves them with 6am timestamps, so the next day he goes and downloads them all over again even though they haven't changed.
If he writes to a local directory, he'll keep the original (like 00:17) timestamps and not re-download the next day.
So, soemthing wrong with CIFS right? Not so fast .. testing with my laptop (main), he'll preserve the original timestamps regardless of writing locally or to the CIFS mount. They are both mounting the filesystem with the same command here:
So, what's going on? They're also both running rsync version 3.2.3 protocol version 31
They also both (buddy and main) have ntp service active and set up identically:
Both are running version 2:6.14-1ubuntu0.1 of cifs-utils..
Virtual machine: 'buddy' .. a VM on my Synology NAS
Code:
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
Laptop: 'main' .. my laptop running pop_os
Code:
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os
The server: Ubuntu 18.04 .. with the backups. They look like this:
Code:
-rw-r--r-- 1 root root 8463482846 Feb 10 00:17 linux_2023_02_10.tgz
-rw-r--r-- 1 root root 8465247672 Feb 11 00:17 linux_2023_02_11.tgz
-rw-r--r-- 1 root root 8471444218 Feb 12 00:17 linux_2023_02_12.tgz
-rw-r--r-- 1 root root 8478096061 Feb 13 00:17 linux_2023_02_13.tgz
-rw-r--r-- 1 root root 8495777571 Feb 14 00:17 linux_2023_02_14.tgz
-rw-r--r-- 1 root root 8498532188 Feb 15 00:17 linux_2023_02_15.tgz
CIFS mount: smb mount on the synology nas .. on ~/synner/
buddy:
Code:
//192.168.86.37/files on /home/rob/synner type cifs (rw,relatime,vers=3.1.1,cache=strict,username=rob,uid=1000,noforceuid,gid=0,noforcegid,addr=192.168.86.37,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)
Code:
//192.168.86.37/files on /home/rob/synner type cifs (rw,relatime,vers=3.1.1,cache=strict,username=rob,uid=1000,noforceuid,gid=0,noforcegid,addr=192.168.86.37,file_mode=0755,dir_mode=0755,soft,nounix,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=5)
Notice some slight differences here .. buddy has 'serverino' and main has 'closetimeo=5'
- serverino: enable the generation of unique file IDs by the server
- closetimeo: not sure
The backup command:
Code:
/usr/bin/rsync -avz --progress [email protected]:/home/backup/ /home/rob/synner/hosting_backups/kp3/
The issue:
When buddy performs the backups at 6am to the CIFS mount, he saves them with 6am timestamps, so the next day he goes and downloads them all over again even though they haven't changed.
If he writes to a local directory, he'll keep the original (like 00:17) timestamps and not re-download the next day.
So, soemthing wrong with CIFS right? Not so fast .. testing with my laptop (main), he'll preserve the original timestamps regardless of writing locally or to the CIFS mount. They are both mounting the filesystem with the same command here:
sudo mount -t cifs -o username=rob,password=<redacted>,uid=1000 //192.168.86.37/files /home/rob/synner
So, what's going on? They're also both running rsync version 3.2.3 protocol version 31
They also both (buddy and main) have ntp service active and set up identically:
Code:
┌([email protected])─-[~─-
└─$ timedatectl
Local time: Wed 2023-02-15 11:23:23 EST
Universal time: Wed 2023-02-15 16:23:23 UTC
RTC time: Wed 2023-02-15 16:23:23
Time zone: America/New_York (EST, -0500)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
┌([email protected])─-[~─-
└─$ timedatectl
Local time: Wed 2023-02-15 11:23:34 EST
Universal time: Wed 2023-02-15 16:23:34 UTC
RTC time: Wed 2023-02-15 16:23:34
Time zone: America/New_York (EST, -0500)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Both are running version 2:6.14-1ubuntu0.1 of cifs-utils..
Last edited: