Hi list, should it be possible to scp a partition with this command: scp /dev/sda7 backupserver:/backup/sda7.img I always get "not a regular file" - which is a clear and understandable error, but my googling tells me that some people are doing this - and it seems to work - at least at their systems. I know that I can avoid this by simply doing dd if=/dev/sda7 | ssh backupserver dd of=/backup/sda7.img So its not a big deal - just curious. System here is a fully updated CentOS 5.2 x86_64 if that matters any thoughts? Henry
henry ritzlmayr wrote:> Hi list, > > should it be possible to scp a partition with this command: > > scp /dev/sda7 backupserver:/backup/sda7.img/dev/sda7 is just a file, if you copy it it doesn't mean you'll copy the contents of the partition you'll just copy the block file itself, equivalent to running the mknod command on the other end. You need to stream the contents of the file to get the data from it, like your dd example. nate
henry ritzlmayr wrote:> Hi list, > > should it be possible to scp a partition with this command: > > scp /dev/sda7 backupserver:/backup/sda7.img > > I always get "not a regular file" - which is a clear and understandable > error, but my googling tells me that some people are doing this - and it > seems to work - at least at their systems. >i think there are two simple ways to do this : 1> mount /dev/sda7 under say /mnt and scp -r /mnt <destination> 2> and rsync - i think it is most simple and suitable for backup through ssh.