external HDD, switch between local and ssh backup, re-copy everything

Asked by udorda

Good evening!

I've been using BiT for a really long time and I'm very happy with it.

My "problem":
* Up to recently I've used BiT to make backups to an external harddisk connected via USB (HDD encrypted with veracrypt, ext4).
* Now I've a shiny new raspi 2 (running ubuntu mate 15.04) to which I've now connected the hard disk. I now want to make the backup to it using the ssh-back-up option.
* Having created a new profile and set the correct host, user and profile-number, BiT correctly discovered the old existing snapshots.
* Still, starting the back-up, BiT makes a complete new copy of my files (instead of transferring only the latest changes).
-> Why is that? Can this be avoided? I can't affort having a new back-up done every time I switch connection method.

Any advice is aprechiated!

Running BiT 1.1.4 on ubuntu 14.10

Cheers,

Ulrich

Question information

Language:
English Edit question
Status:
Answered
For:
Back In Time Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Germar (germar) said :
#1

Hi Ulrich,

this should normally work without a new backup. Why do you think it creates a new copy? Please take a look at FAQ #2403.

Please post a shortened version (just start and end) of your snapshot log.

Regards,
Germar

Revision history for this message
udorda (ulrich-dorda) said :
#2

Hi Germar,

Thanks a lot for the feedback! - It's good to hear that this should actually work.

I suspected it to take a complete new snapshot because it took ages to run the backup - I knew that there were only a few changes done since the last backup but it still took a long time and in the statusbar in the bottom it listed all the filenames it was copying. Just before the backintime backup I had used copied a comparable amount to the external HDD via the network and it took about the same time like backintime to do just the incrementatl backup (thus I knew it was not the network...).

Given that it took a lot longer than anticipated and I did not want to fill up my HDD unnescessarily, I had to interrup it and the snapshot was still the new_snapshot folder where I can't find a log-file (probably because I had to shut down the PC bevore it could finish).

I followed the suggestions given in the other post you wrote:
- I checked the inode counter of a file which was not changed. While in the previous snapshots it had a counter of 30, the one in the new_snapshot folder has a 1
- If I run 'du -hd1' in the snapshot folder, I find:
29G ./20140406-170740-276 <-this is the first backup I had done
23G ./new_snapshot <- the snapshot was not finished and quite some files are still missing.
......

It thus think that it really copied the files.

I found in the 'Options' tab of the settings the option 'Use checksum to detect changes' which is not used (default). Could this help?

I'll rerun it as soon as I find the time to have it run longer and post the result. I hope to get it still done bevore easter holidays.

Thanks a lot for your help and BiT in general - It's simply great!!

Cheers,

Ulrich

Revision history for this message
Germar (germar) said :
#3

You're right. It made a complete new copy.

I double checked this with a simple setup in two VM's. It worked like expected. So in general this should work.

Checksum could help. But this would also increase time dramatically.

You'll find the log in ~/.local/share/backintime/takesnapshot_X.log where X stands for the profile ID. Please also attach the relevant part of /var/log/syslog

Just some thoughts to check:
1. Please make sure you have the same settings for 'full rsync mode' in both profiles

2. Which user does own the files on your remote host? Is it the same user as on your local machine?

3. Do you have correct time on both machines (not sure if this would really make a difference but better check this than we will try to troubleshoot for ages and find out it was that simple ;-)

Regards,
Germar

Revision history for this message
udorda (ulrich-dorda) said :
#4

Hi!

Thanks a lot for your reply! I was gone fore Easter holidays and I'm only back now to follow this up.

ad 1) In both profiles the option "full rsync mde" is not enabled.

ad 2) It is the same username on both machines.

ad 3) I checked the time on both machine and they are both correct.

The relevant parts of the syslog-file:
Apr 8 22:09:45 MpyUblDorda backintime (udorda): INFO: mount ssh: udorda@192.168.1.2:/home/udorda/short/mountpoints/1tb/backup on /home/udorda/.local/share/backintime/mnt/D64A297/mountpoint
Apr 8 22:09:49 MpyUblDorda backintime (udorda): INFO: Lock
Apr 8 22:09:49 MpyUblDorda backintime (udorda): INFO: Inhibit Suspend started. Reason: take snapshot
Apr 8 22:09:49 MpyUblDorda backintime (udorda): INFO: Mountpoint /home/udorda/.local/share/backintime/mnt/D64A297/mountpoint is already mounted
Apr 8 22:09:49 MpyUblDorda backintime (udorda): INFO: on process begins
Apr 8 22:09:49 MpyUblDorda backintime (udorda): INFO: Profile_id: 6
Apr 8 22:09:49 MpyUblDorda backintime (udorda): INFO: Compare with old snapshot: 20150401-225335-124
Apr 8 22:09:49 MpyUblDorda /qt4systrayicon.py: INFO: [qt4systrayicon] begin loop
Apr 8 22:10:17 MpyUblDorda backintime (udorda): INFO: Command "rsync -rtDHh --links --no-p --no-g --no-o --info=progress2 --no-i-r --rsh="ssh -p 22 " --delete --delete-excluded -i --dry-run --out-format="BACKINTIME: %i %n%L" --chmod=Du+wx --exclude="/home/udorda/.local/share/backintime/mnt/6_29775" --exclude="/home/udorda/.local/share/backintime" --exclude=".local/share/backintime/mnt" --include="/home/udorda/data/" --include="/home/udorda/" --include="/home/" --exclude=".gvfs" --exclude=".cache/*" --exclude=".thumbnails*" --exclude="[Tt]rash*" --exclude="*.backup*" --exclude="*~" --exclude=".dropbox*" --exclude="/proc/*" --exclude="/sys/*" --exclude="/dev/*" --exclude="/run/*" --exclude="/etc/mtab" --exclude="/var/cache/apt/archives/*.deb" --exclude="lost+found/*" --exclude="/tmp/*" --exclude="/var/tmp/*" --exclude="/var/backups/*" --exclude=".Private" --include="/home/udorda/data/**" --exclude="*" /
Apr 8 22:10:17 MpyUblDorda backintime (udorda): INFO: CONTINUE: 'udorda@192.168.1.2:"/home/udorda/short/mountpoints/1tb/backup/backintime/MpyUblDorda/udorda/2/20150401-225335-124/backup/"'" returns 0
Apr 8 22:10:17 MpyUblDorda backintime (udorda): INFO: Create hard-links
Apr 8 22:10:20 MpyUblDorda backintime (udorda): WARNING: Command "ssh -p 22 -o ServerAliveInterval=240 udorda@192.168.1.2 'find "/home/udorda/short/mountpoints/1tb/backup/backintime/MpyUblDorda/udorda/2/20150401-225335-124/backup/" -type d -exec chmod u+wx "{}" +'" returns 256
Apr 8 22:10:30 MpyUblDorda backintime (udorda): INFO: Mountpoint /home/udorda/.local/share/backintime/mnt/D64A297/mountpoint still in use. Keep mounted
Apr 8 22:10:47 MpyUblDorda backintime (udorda): WARNING: Command "ssh -p 22 -o ServerAliveInterval=240 udorda@192.168.1.2 cp -aRl "/home/udorda/short/mountpoints/1tb/backup/backintime/MpyUblDorda/udorda/2/20150401-225335-124/backup/"* "/home/udorda/short/mountpoints/1tb/backup/backintime/MpyUblDorda/udorda/2/new_snapshot/backup/"" returns 256
Apr 8 22:11:17 MpyUblDorda backintime (udorda): WARNING: Command "ssh -p 22 -o ServerAliveInterval=240 udorda@192.168.1.2 'find "/home/udorda/short/mountpoints/1tb/backup/backintime/MpyUblDorda/udorda/2/20150401-225335-124/backup/" -type d -exec chmod a-w "{}" +'" returns 256
Apr 8 22:11:19 MpyUblDorda backintime (udorda): INFO: Command "ssh -p 22 -o ServerAliveInterval=240 udorda@192.168.1.2 chmod -R a+w "/home/udorda/short/mountpoints/1tb/backup/backintime/MpyUblDorda/udorda/2/new_snapshot"" returns 0
Apr 8 22:11:19 MpyUblDorda backintime (udorda): INFO: Call rsync to take the snapshot
Apr 8 22:13:46 MpyUblDorda backintime (udorda): INFO: Mountpoint /home/udorda/.local/share/backintime/mnt/D64A297/mountpoint is already mounted

And here is the head of the logfile:
========== Take snapshot (profile 6): Wed Apr 8 22:09:49 2015 ==========

[I] ...
[I] Compare with snapshot 2015-04-01 22:53:35
[I] rsync -rtDHh --links --no-p --no-g --no-o --info=progress2 --no-i-r --rsh="ssh -p 22 " --delete --delete-excluded -i --dry-run --out-format="BACKINTIME: %i %n%L" --chmod=Du+wx --exclude="/home/udorda/.local/share/backintime/mnt/6_29775" --exclude="/home/udorda/.local/share/backintime" --exclude=".local/share/backintime/mnt" --include="/home/udorda/data/" --include="/home/udorda/" --include="/home/" --exclude=".gvfs" --exclude=".cache/*" --exclude=".thumbnails*" --exclude="[Tt]rash*" --exclude="*.backup*" --exclude="*~" --exclude=".dropbox*" --exclude="/proc/*" --exclude="/sys/*" --exclude="/dev/*" --exclude="/run/*" --exclude="/etc/mtab" --exclude="/var/cache/apt/archives/*.deb" --exclude="lost+found/*" --exclude="/tmp/*" --exclude="/var/tmp/*" --exclude="/var/backups/*" --exclude=".Private" --include="/home/udorda/data/**" --exclude="*" / 'udorda@192.168.1.2:"/home/udorda/short/mountpoints/1tb/backup/backintime/MpyUblDorda/udorda/2/20150401-225335-124/backup/"'
[C] <f+++++++++ home/udorda/data/pchilfen/fonts/Analecta.otf

I still wonder if it could be because the whole HDD is encrypted (using veracrypt)? Of course it's the same no matter to which computer I connect it, but still.... Unfortunately I don't have another HDD which is not encrypted at hand, but maybe I'll find a simple USB stick somewhere....

Thanks again! BiT really rocks!

Cheers,

Ulrich

Revision history for this message
Germar (germar) said :
#5

Looks like permission problems. Your remote user is not able to change permissions nor copy the whole snapshot.

Please run (all one line):
ssh -p 22 -o ServerAliveInterval=240 udorda@192.168.1.2 'find "/home/udorda/short/mountpoints/1tb/backup/backintime/MpyUblDorda/udorda/2/20150401-225335-124/backup/" -type d -exec chmod u+wx "{}" +'

manually and make sure it was able to add write permissions to all folder.

Then run (all one line):
ssh -p 22 -o ServerAliveInterval=240 udorda@192.168.1.2 cp -aRl "/home/udorda/short/mountpoints/1tb/backup/backintime/MpyUblDorda/udorda/2/20150401-225335-124/backup/"* "/home/udorda/short/mountpoints/1tb/backup/backintime/MpyUblDorda/udorda/2/new_snapshot/backup/"

Both commands returned with a non zero returncode in BIT. You need to make sure the drive is mounted correctly and your user is owner of the files.

Can you help with this problem?

Provide an answer of your own, or ask udorda for more information if necessary.

To post a message you must log in.