Results 1 to 1 of 1
So, im trying to make a backup of a hard drive and compress it and send it to an ftp server. Similar to g4u. But I dont want to read ...
- 01-30-2009 #1Just Joined!
- Join Date
- Jan 2009
- Posts
- 17
Help with dd's count...HDD backup
So, im trying to make a backup of a hard drive and compress it and send it to an ftp server. Similar to g4u. But I dont want to read the whole disk, just up the point where the rest is outside the file system.
So I have:
and ftpput.sh is essentiallyibs=1M
count=[equation to get a count to an upper limit.... lets say it is 9000]
dd conv=noerror,sync ibs=$ibs count=$count if=/dev/sdb | sh ftpput.sh $tmpfile ${gzip_opt}tmpfile simply has the commands for ftp inside, like logging in and putting the file.gz.( cat $tmpfile
dd bs=1m | gzip $gzip_opts
) | ftp -n
This code executes no problem and results in a compressed file on the ftp. But when trying to pull it down with slurpdisk.sh or simply decompress it, i get the error that the input is not in gzip format.
The only change i made to the upload script was introduced the count variable. Is this causing problems with gzip's input in the pipe? Resulting in a crazy .gz file that cant be decompressed?


Reply With Quote