StefanX
November 16th, 2009, 11:30 PM
Hi!
I use an encrypted partition (dm-crypt) for my home directory. Currently I am evaluating an appropriate and secure strategy for a remote backup. Therefore I could rsync my encrypted partition to a remote backup server. This works but has the drawback that the partition needs to be unmounted while executing backup. To avoid this drawback I had the following idea:
Mount the backup system (with SSHFS because it is available via SSH only) and use a partition container file on the remote system which I mount locally. Then I could rsync between my local data and the remote partition while both beeing mounted.
I tried to set up the system the following way:
1. I mounted the remote system and created a container file to act as my backup partition container.
2. Because it is a file and not a block device AFAIK I need to use a loop device before mounting. Therefore I execute "losetup /dev/loop3 /remote/container.img". Unfortunately it does not work out and I retrieve "Permission denied". I tried with two different remote systems (all mounted via SSH) also with root user who definitely has sufficient permissions on the remote system.
I was told that SSH allows file oriented transfer only and therefore does not allow the transfer of specific bytes of a file (which might be a reason for this problem) but this is not conform with my experience of SSH.
Any idea what might be the cause of the problem and how to set up the described scenario?
I use an encrypted partition (dm-crypt) for my home directory. Currently I am evaluating an appropriate and secure strategy for a remote backup. Therefore I could rsync my encrypted partition to a remote backup server. This works but has the drawback that the partition needs to be unmounted while executing backup. To avoid this drawback I had the following idea:
Mount the backup system (with SSHFS because it is available via SSH only) and use a partition container file on the remote system which I mount locally. Then I could rsync between my local data and the remote partition while both beeing mounted.
I tried to set up the system the following way:
1. I mounted the remote system and created a container file to act as my backup partition container.
2. Because it is a file and not a block device AFAIK I need to use a loop device before mounting. Therefore I execute "losetup /dev/loop3 /remote/container.img". Unfortunately it does not work out and I retrieve "Permission denied". I tried with two different remote systems (all mounted via SSH) also with root user who definitely has sufficient permissions on the remote system.
I was told that SSH allows file oriented transfer only and therefore does not allow the transfer of specific bytes of a file (which might be a reason for this problem) but this is not conform with my experience of SSH.
Any idea what might be the cause of the problem and how to set up the described scenario?