quentin
8th July 2008, 13:14
Hi,
Wondering if someone can help me out with this one:
I want to make disk images of a server and store them somewhere remote.
Ofcourse you can do this with dd and upload the file with sftp to a remote server. The downside is that it requires a huge amount of free space to store the temporary disk image file.
Is there a way to "stream" it directly to a sftp-server?
As far as I came up with was this:
dd if=/dev/sda | bzip2 > /backup/disk.img | sftp -b /backup/dd.txt
-oIdentityFile=/backup/sshkey.key remoteuser@remoteserver.com
contents of dd.txt:
-cd remotebackup
put /backup/disk.img
quit
In this case it will store the disk.img locally first and then send it. So I was wondering if there was an easier way to this and stream it directly.
(Note: The remote SFTP-server is a Windows-machine, so no linux shell commands can be executed)
Thanks in forward for any help.
Best regards,
Quentin
Wondering if someone can help me out with this one:
I want to make disk images of a server and store them somewhere remote.
Ofcourse you can do this with dd and upload the file with sftp to a remote server. The downside is that it requires a huge amount of free space to store the temporary disk image file.
Is there a way to "stream" it directly to a sftp-server?
As far as I came up with was this:
dd if=/dev/sda | bzip2 > /backup/disk.img | sftp -b /backup/dd.txt
-oIdentityFile=/backup/sshkey.key remoteuser@remoteserver.com
contents of dd.txt:
-cd remotebackup
put /backup/disk.img
quit
In this case it will store the disk.img locally first and then send it. So I was wondering if there was an easier way to this and stream it directly.
(Note: The remote SFTP-server is a Windows-machine, so no linux shell commands can be executed)
Thanks in forward for any help.
Best regards,
Quentin