an interesting email?<br><br><br><b><i>Nistur <nistur@googlemail.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> I was having a chat last night at the counting house and rememebred something I was fiddling around with a few months ago but never got sorted.<br><br>>> Okay..<br><br>I have a Windows Mobile based phone. I have 2x 2GB SD cards. I have an SD card reader on my laptop. I have 1.4GB mini DVD-Rs<br><br>>>OKay<br><br>Basically, I was wondering if there was any way to back up the SD cards into a single file archive, but with no compression. I never use more than 1.4GB on any card<br><br>okay >> if you don't use more the 1.4GB on a card,<br>then you can backup without compression. however<br>if you use dd, then it will backup at the block level,<br>so it will actually copy empty space too!, so<br>you got a few options.<br><br>1. Create a 600MB file of 'zero
bytes)...<br>then to backup do dd=if=/dev/yousdcard - | gzip > mybackup<br><br>you should get a file smaller than 1.4GB<br><br>if you get larger than 1.4GB, you could always split in into two 1GB images???<br><br>I don't think you can use sparse files either, as you<br>just doing an image.<br><br>you should be able to mount this if it is a sane<br>file system.<br><br>just do<br><br>then to backup do dd=if=/dev/yousdcard of=mybackup<br><br>something like.<br><br><pre>mount myback /mountpoint -t auto -o loop</pre>should be able to mount it!! if it's fat 32...<br><br>obviiosuly just reverse the dd if you want to put it back<br>this maybe be slow!!!! be aware the sd cards have a limited write capacity, so very time you swap data, you<br>lowering the lifetime of your sdcard. it may prove better<br>to rsync if bits of your sd card don't change.<br><br><br>, but would like to have more than 2 options, say 1 for music, one with photos, one with graphics applications, one with
emulators and roms etc. In the end I would like to automate it so I can switch the contents of the cards, with a shell script for example. <br><br>>>that should be easy.<br><br>I was kinda hoping dd would give me an option to only copy until the partition went blank. <br>The reason for me not wanting any compression is mainly the photos, the camera on it is crap, but of some use anyway, however if I keep compressing and uncompressing over and over again, I'm eventually going to end up with every file being one large pixel. <br><br>>> what are you going on about? I think you need to<br>lookup the difference between lossy and unlossy compression systems. gzip never looses data bits<br>I think you have you knicker in a twist over this.<br><br><br><br>On a similar note, is it possible to create a filesystem within a file and mount it with -o loop but not have to set the file size before. I have managed to create a 4GB ext3 file but was wondering whether it would be
possible to have one with a variable size, the more you put in it, the bigger it got kinda thing. <br><br>>> yeah, you need to create a sparse file, sparse files <br>can be any size, but unix only allocates real blocks on<br>disk when you write to them do a search for sparse files unix dd and you should get results.<br><br><br><br><br>Thanks in advance<br><br>no thank you...<br><br>Nistur<br><br>>>it's lee actually.<br><br> _______________________________________________<br>dundee GNU/Linux Users Group mailing list<br>dundee@lists.lug.org.uk http://dundee.lug.org.uk<br>https://mailman.lug.org.uk/mailman/listinfo/dundee<br>Chat on IRC, #tlug on dundee.lug.org.uk</blockquote><br><p> 
<hr size=1>
For ideas on reducing your carbon footprint visit <a href="http://uk.promotions.yahoo.com/forgood/environment.html">Yahoo! For Good</a> this month.