Comment 8 for bug 412470

Revision history for this message
Borph (borph) wrote : Re: hardlinking doesnt work from cronjob with schedule per included folder enabled

I reproduced now the issue with the *~ files!

I made two folders with two files each:
peter@borphtux:~$ ls /home/peter/BiTtest/
file1.txt file2.txt subfolder
peter@borphtux:~$ ls /home/peter/BiTtest/subfolder/
file3.txt file4.txt

The schedule was:
/home/peter/BiTtest: every 10min
/home/peter/BiTtest/subfolder: every 5min

The config file (part):
snapshots.exclude_patterns=*.backup*:/media:/lost+found:**/.thumbnails/**
snapshots.expert.per_directory_schedule=true
snapshots.include_folders=/home/peter/BiTtest|4:/home/peter/BiTtest/subfolder|2

I made a forced backup and got a "20090831-203106" folder with the expected files.

I changed file1 and file3 and waited. 20090831-204000 got created with including both folders as expected.

I changed again both files. 20090831-204500 got created with these files:
peter@borphtux:~$ ls -l /media/BigBilly/System/BackInTime/backintime/20090831-204500/backup/home/peter/BiTtest/
insgesamt 12
-r--r--r-- 2 peter peter 11 2009-08-31 20:35 file1.txt
-r--r--r-- 4 peter peter 10 2009-08-31 20:28 file2.txt
drwxr-xr-x 2 peter peter 4096 2009-08-31 20:36 subfolder
(this is as expected, unchanged, but was not due)

peter@borphtux:~$ ls -l /media/BigBilly/System/BackInTime/backintime/20090831-204500/backup/home/peter/BiTtest/subfolder/
insgesamt 16
-r--r--r-- 2 peter peter 11 2009-08-31 20:36 file3.txt
-r--r--r-- 1 peter peter 12 2009-08-31 20:41 file3.txt~
-r--r--r-- 4 peter peter 10 2009-08-31 20:28 file4.txt
-r--r--r-- 1 peter peter 10 2009-08-31 20:28 file4.txt~

Hum, these *~ files got created! During the next 10-min backup they disappear, ok, but this means they come each time a subfolder is backed up and a folder above not!

Lets see the logfile:
INFO: Create hard-links
INFO: Command "cp -al "/media/BigBilly/System/BackInTime/backintime/20090831-204000/backup/home/peter/BiTtest/subfolder"* "/media/BigBilly/System/BackInTime/backintime/new_snapshot/backup/home/peter/BiTtest/subfolder"" returns 0
INFO: Call rsync to take the snapshot
INFO: Command "rsync -aEAX -v --delete-excluded --chmod=Fa-w,D+w --whole-file --delete --exclude="/media/BigBilly/System/BackInTime" --exclude="/root/.local/share/backintime" --include="/home/peter/BiTtest/subfolder/" --include="/home/peter/BiTtest/" --include="/home/peter/" --include="/home/" --exclude="*.backup*" --exclude="/media" --exclude="/lost+found" --exclude="**/.thumbnails/**" --exclude="/home/peter/BiTtest" --include="/home/peter/BiTtest/subfolder/**" --exclude="*" / "/media/BigBilly/System/BackInTime/backintime/new_snapshot/backup/"" returns 0
INFO: Save permissions
INFO: Command "cp -alb "/media/BigBilly/System/BackInTime/backintime/20090831-204000/backup/home/peter/BiTtest/"* "/media/BigBilly/System/BackInTime/backintime/new_snapshot/backup/home/peter/BiTtest"" returns 0

So I guess the second cp -alb copies the old version (the previous snapshot) again over the new_snapshot. This explains the file-dates!

Of course the cp -alb after the rsync is meant to copy hard-linked the folders, which have not been synced. But if the folders are not disjoint, this command includes recursively already synced files, attempting to overwrite them.

Last but not least:
peter@borphtux:~$ backintime -v
Back In Time
Version: 0.9.26