Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: rhalff on January 30, 2013, 06:11:25 PM
-
Hi People,
SS=/
I modified some files to allow for tar backup (which is faster as tgz, yet applies almost no compression).
I can imagine use cases where storage size is not so much of a problem and packing / extraction speed will be a benefit.
I've chosen to add SSetcSSsysconfigSSbackup_fmt to specify whether you want "tar" or "tgz" as your backup format.
However, since we have a chicken and egg problem here, to fully apply the change the initrd image should be updated (because that's where filetool.sh tc-restore.sh etc. resides).
I have added the changes in the attachment, just use the diff tool against the original files to see what I have changed.
(I had some more post content, but somehow this forum thinks I'm posting external links while pasting source code (within code tags))
-
have you actually measured it?
-
Yeah I did:
time ./filetool.sh -b
Backing up files to /mnt/sda1/tce/mydata.tar
real 0m 17.82s
user 0m 0.03s
sys 0m 0.14s
time /usr/bin/filetool.sh -b
Backing up files to /mnt/sda1/tce/mydata.tgz
real 0m 36.07s
user 0m 27.99s
sys 0m 0.16s
ls -lh /mnt/sda1/tce/mydata.*
-rw-r--r-- 1 root root 68.5M Jan 30 15:37 /mnt/sda1/tce/mydata.tar
-rw-r--r-- 1 root root 20.8M Jan 30 15:38 /mnt/sda1/tce/mydata.tgz
-
Interesting. and I have to say you have quite a big backup!
-rwxrwxrwx 1 tc staff 3.1M Jan 31 11:15 /mnt/sdb1/mydata.tgz
tc@x200:~$ time filetool.sh -b
Backing up files to /mnt/sdb1//mydata.tgzDone.
real 0m 2.11s
user 0m 0.70s
sys 0m 0.05s
my tgz: 1.5M/s
your tgz: 0.6M/s
your tar: 3.8M/s
different media and how capable your cpu is might make big differences here.
-
It's just that big because I tar my home dir.
Ah well, no idea if there are use cases for this, maybe somebody finds it useful.
-
Note that those numbers without knowledge of circumstances mean little regarding comparison.
If you do 2 consecutive backups, and then another one after doing "sudo cache-clear", the latter may take a multiple of time of the preceeding one, due to not making use of cached data.