Goals
This script is dedicated to backup my important data.
Specification
Configuration can be provided through command line or a file. The file is in "ini" style.
Data that should be backup are duplicated as many times as possible. This data are not compressed. They are stored in a way that made possible to restore it, without any special program and the media for doing backup should be as standard as possible. For now, the media is a standard CD-(R|RW)/DVD(+|-)(R|RW) and the file are simply copied on the media (as simple file). This is the simplest way to do backup, and it is made on purpose. Any more complicated mean, would imply having special tools or to loose more data if something fails. For example, if you compress your data and that the CDROM get corrupted (scratch...) you will loose most of the compressed data.
If possible, the media type and capacity should be auto detected. This is done thourgh HAL/DBUS (thanks to Perl-NetDBUS). If this is not possible or if user asked not to detect it, a defaul type and capacity are used.
Data to backup are defined as a set of directory. At the root of each directory, a local configuration can be found in ".config/admin-gallu/backup/". This directory contains a set of file to define how the date should be mirrored to the cache. The date are mirrored to the cache using mirrordir. This program allow to define a script-file to decide what to mirror. Another file is the list of file that should be only saved once. And the list of file that has already been saved once.
Data can be classified in 3 categories:
- normal-data: saved each time
- once-data: saved only once on a non rewritable media
- once-saved-data: already saved once on a non rewritable media
Once-saved-data and once-data are a set of directory and file designated using a glob in a configuration file. They are considered as immutable data. They won't be checked for update! A once-saved-data can only become a once-data if the user remove the line of the once-save-data in the configuration file.
There is a diffrence between rewritable and non rewritable media. This has to do with the fact that data written on rewritable media are not safe! Anyone can erase them while rewriting the media. So, things are considered really saved when they have been save on a non rewritable support.
During a backup process, normal-data and once-data are used to generate a ISO. If the ISO is smaller than the media size, once-saved-data are used to complete the ISO. Once-saved-data to be used are chosen randomly considering the fact that a data that has not been saved for a long time will have more chance to be chosen.
Lang: Perl




