Lifestream Data Structure
Now that our lifestream site is running I thought I'd apply the same structure to the files and data I generate daily.
These tend to be small documents , images , PDF files , Internet downloads , scripts , etc.
This way I have a new empty directory for the files I create and use each day.
Over the course of the year this folder gets larger but I can archive the oldest parts of the tree to DVD-R as required.
The tree structure gives each file 'revision' , so if I create a document on Monday and update it on Tuesday they are kept separate and I can roll back easily.
I use the Gnome "Search for Files" tool if the files exact location eludes me.
To get it working I created a script called lifestream_day_change which gets called at midnight via my crontab.
#!/bin/sh # script to create a new days lifestream file system structure # # define location of lifestream LOCATION=/home/mark/lifestream # compute and store today variable TODAY=$LOCATION/`date +%Y/%m/%d` # first make a new directory and any required parents mkdir -p $TODAY # # remove the previous lifestream folder link rm ~/today # # create a link in the home directory to todays lifestream folder ln -s $TODAY ~/today
In Nautilus I also have a sidebar entry for ~/today so its easy to locate in any file requester.
Backups
Today I decided to backed up my lifestream directory , first I measured its size with :-
du -hs /home/mark/lifestream/
As its only 101Mb I just used tar and gzip to create a simple archive file , like this :-
tar -czvf /home/mark/dvd_build/Backups/LifeStream_20080725.tgz /home/mark/lifestream/
Leave any ideas or improvements in the comments and I'll include them.

Comments
Post new comment