lp:~germar/backintime/ssh

Created by Germar and last modified

This branch provide ssh access for BackinTime. In Settings > General > Advanced you can choose SSH.

Prepare for ssh:
- add the user to group 'fuse' by typing 'sudo adduser <USER> fuse'
- create a password-less login (for further instructions look at http://www.debian-administration.org/articles/152)
      type in terminal:
      'ssh-keygen -t rsa' #hit enter for default path and keep the passphrase empty
      'ssh-copy-id -i ~/.ssh/id_rsa.pub <USER>@<HOST>'

BackinTime/ssh uses sshfs to mount the remote path to local mountpoint. Rsync will run it's magic over ssh directly on the remote host. Time-consuming tasks like 'Create hard-links' also run remote over ssh.
I don't have specific times till now, but BackinTime/ssh performs a lot better than my previews setup with nfs-mount.
[Update 2012-10-08: Overall speed increase is ~60%. 'Create hard-links' is ~140% faster, and 'remove snapshot' ~110% faster than before. But the best is if you have a look on the load.
localhost: https://dl.dropbox.com/u/15706464/localhost_currentload_backintime_nfs_vs_ssh.png
remote host: https://dl.dropbox.com/u/15706464/nas2_currentload_backintime_nfs_vs_ssh.png
]

For even better performance you can choose the cipher for ssh. Run 'backintime --benchmark-cipher [FILESIZE]' in terminal will give you an overview over which cipher is the fastest in your environment. My preferred one is 'arcfour'. It comes with 140% speed increase compared to default 'aes128-ctr' in my setup. But that depends a lot on where your bottleneck is. In my case it is the CPU of the remote host (WesternDigital MyBook WorldEdition whitelight). If you backup between two powerfull PC's the bottleneck will be more likely the network or harddrive. In this case you should stay on default cipher. A weaker cipher does mean weaker security even if all supported ciphers are known to be safe at the moment.

If you backup to an embedded Linux NAS like the WD MyBook WorldEdition you could run into some problems caused by feature-less commands on the embedded Linux. In my case 'cp' and 'chmod' didn't have support for hardlinks. But I installed Optware on it a while ago which comes with full-featured commands in '/opt/bin/'.
Till now I wasn't able to trick the PATH environment or add an alias that will make 'cp' point to '/opt/bin/cp' even in non-interactive ssh session (it works if I login and run the command but not if I run 'ssh user@host cp -aRl source target' like it is done by BackinTime).
Right now I'm using an ugly hack to change the commands in snapshots.py to their '/opt/bin' equivalent (not in this branch). But if I don't find a better solution, I will implement an option to specific commands full path.
[Update 2012-10-05: After changing users shell to /opt/bin/bash in passwd the non-interactive commands has been replaced with /opt/bin equivalents, too. The problem was again the feature-less /bin/sh. So, no needs of ugly hack's anymore]

GUI support is only for Gnome right now. I will add KDE if there is a request.

[Update 2012-10-17: KDE support is now added. This branch now contain a framework for mounting different services which makes it easy to add more services to BackinTime in the future. A template is provided (dummytools.py). But for now there is only ssh.]

Get this branch:
bzr branch lp:~germar/backintime/ssh
Only Germar can upload to this branch. If you are Germar please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Germar
Project:
Back In Time
Status:
Merged

Recent revisions

817. By Germar

update manpage; change license from MIT to GPL for mount sshtools and dummytools

816. By Germar

bugfix: wrong path if restore system root; restore using rsync over ssh

815. By Germar

ssh bugfix: won't mount if local LC_ALL locale is not available on remote host

814. By Germar

ssh bugfix: remove tmpdir after check_remote_commands(); make check_remote_commands() quiet; bugfix: end settingsdialog.validate() if save_profile() returns false

813. By Germar

bugfix: log_pid end with '.' on tmp_mount; remove feature disable_chmod; test cron pattern for custom_hours; bugfix: don't mount on mode local in settingsdialog

812. By Germar

bugfix: TypeError in kde4/settingsdialog.py

811. By Germar

ssh: check rsync and improved check commands; add '-p PORT' to all ssh sessions; change error messages

810. By Germar

ssh: check remote commands and hardlinks

809. By Germar

add KDE support

808. By Germar

new arguments '--keep-mount' and '--unmount'; add SSH to man-page

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers