]> sipb.mit.edu Git - ikiwiki.git/blob - doc/forum/ikiwiki_and_big_files.mdwn
binary blob question
[ikiwiki.git] / doc / forum / ikiwiki_and_big_files.mdwn
1 My website has 214 hand written html, 1500 of pictures and a few, err sorry, 114
2 video files. All this takes around 1.5 GB of disk space at the moment.
3 Plain html files take 1.7 MB and fit naturally into git.
4
5 But what about the picture and video files?
6
7 Pictures are mostly static and rarely need to be edited after first upload, 
8 wasting a megabyte or two after an edit while having them in git doesn't really matter. 
9 Videos on the other hand are quite large from megabytes to hundreds. Sometimes
10 I re-encode them from the original source with better codec parameters and just
11 replace the files under html root so they are accessible from the same URL.
12 So having a way to delete a 200 MB file and upload a new one with same name and access URL
13 is what I need. And it appears git has trouble erasing commits from history, or requires
14 some serious gitfoo and good backups of the original repository.
15
16 So which ikiwiki backend could handle piles of large binary files? Or should I go for a separate
17 data/binary blob directory next to ikiwiki content?
18
19 Further complication is my intention to keep URL compatibility with old handwritten and ikiwiki
20 based site. Sigh, tough job but luckily just a hobby.
21
22 [-Mikko](http://mcfrisk.kapsi.fi)
23
24 ps. here's how to calculate space taken by html, picture and video files:
25
26     ~/www$ unset sum; for size in $( for ext in htm html txt xml log; \
27     do find . -iname "*$ext" -exec stat -c "%s" \{\} \; ; done | xargs ); \
28     do sum=$(( $sum + $size )); done ; echo $sum
29     1720696
30     ~/www$ unset sum; for size in $( for ext in jpg gif jpeg png; \
31     do find . -iname "*$ext" -exec stat -c "%s" \{\} \; ; done | xargs ); \
32     do sum=$(( $sum + $size )); done ; echo $sum
33     46032184
34     ~/www$ unset sum; for size in $( for ext in avi dv mpeg mp4; \
35     do find . -iname "*$ext" -exec stat -c "%s" \{\} \; ; done | xargs ); \
36     do sum=$(( $sum + $size )); done ; echo $sum
37     1351890888