30 Nov 2008 17:52

Co znaczy "oszukać"?

Comments: 1

How To Easily Backup Your Files Using Svn

28 Nov 2008 15:00

There are two kinds of people:

  • those who backup their files
  • and those who will

Today I will blog about backups.


There are many backup solutions, but actually the idea of backing data up is straight and simple. Backups are about periodically copying files to some other machine. This way we can access copied files even if the original files were lost.

There are two main causes for data loss:

  1. hardware failure
  2. human mistake

From my experience, the latter happens more often than the first.

My way of doing backups

I manage my documents backup using SVN (a.k.a. Subversion). SVN is used mostly by programmers to store the source code for their projects. What is Subversion cool about:

  • central repository stores files and their history
  • access to all historical version of every file
  • two-way synchronization with repository
    • update — get the changes from the repository and apply them to files on the local disk
    • commit — apply the changes made on the local disk to the repository
      • after a successful commit, repository files matches exactly files from your disk
  • WWW access to the newest version of every file

So what do we need to backup files using SVN?

  1. a repository
  2. we need to upload (commit) the first version of the directory that is to backed up every now and then
  3. we need to commit the directory changes (more or less) regularly
    • once we understand how this works, we can write an easy script and create a cronjob (if you're Linux/Mac user)

What we get?

  1. files are copied over the network to some other place than the local disk
  2. history of file changes — access to every file version (one version per backup)
  3. web access to our documents — in case we don't have our computer when we need a document
    • if the SVN repository is publicly accessible
  4. incremental backups — only files that changed are sent through the network (and if the files are textual only the differences are sent)


How to upload the initial version of files

# go to the directory
cd /dir/you/want/to/back/up
# next line is optional (in case the directory is system, like /etc)
sudo su -
svn co http://URL/to/the/public/repository
# supply the user and password when svn asks for them
svn add * .[^.]*
# you can skip the .[^.]* if you don't care about the hidden files or don't have any
svn commit -m 'initial backup'
# this will transfer all of your files to the server. You're done.

How to commit local changes to the repository

cd /dir/you/want/to/back/up
# next line is optional (in case the directory is system, like /etc)
sudo su -
svn commit -m 'another backup'
# this will transfer all of your files to the server

How to access the last version of some file

Just navigate your browser to the repository URL (it should start with http or https). Supply user and password… and your browsing your files!

How to access older version of files

You need to grab some SVN client, supply the repository URL, user and password and use the program interface to navigate through revisions (versions), directories and files.


Using SVN can greatly simplify backups of important documents. Additionally, with no effort, you get a browsable version of the directories you backup.

I recommend this solution to everyone. However you should know, that SVN creates .svn directory in every directory it backs up. This can be just OK or totally unacceptable for some directories (like system or application data). So use at your own risk.

Comments: 3

News From Piotr

19 Nov 2008 23:05

Hi, it's Piotr and I have some news for you.

First of all, I started writing down any tips for Linux users of Sony Vaio SZ series, just like me. It's not complete, but really the time to figure all this out for me was less than writing it down, but I wish these all information was listed somewhere. That's why I started that list.

Secondly I have an announcement in Polish:

Sprzedam laptopa HP Mini Note 2133. Cena 1500. Stan: nieużywany, nowy z gwarancją.

Then I need to share with this one. I've moved Wiki thumbnails generator to other machine, make it running in parallel (4 thumbs at once) and decided to only make thumbnail for wikis with more than 20 edits (you get about 15 edits with just starting a wiki).

This all made the thumbnail generation process to take only about 15 hours for every public, not-spam, not-empty wiki. This means we can update them more regularly.

Another news is that the thumbnails are now generated as JPEGs instead of PNGs which makes them about 10 times smaller in weight than before. This also means, that in case you already use the old thumbnails, you'll have to update, now the URL is:

http://your-wiki.wikidot.com/local--thumbnail/medium.jpg and

You have to wait till tomorrow to let them work, because they are still being generated.

Comments: 3

28,888 Tracks Played

11 Nov 2008 14:04

Today my girlfriend realized that I have 28,888 tracks played and scrobbled to Last.fm — the social music revolution portal.

11 Nov 2008:


and now:


Comments: 0

page 1 of 212next »
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License