Skip to content
Snippets Groups Projects
Commit 890758b9 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Initial commit.

parent 6b9172bc
No related branches found
No related tags found
No related merge requests found
2003-04-18 Per Cederqvist <ceder@ceder.dyndns.org>
* AUTHORS: New file.
* Makefile.am: New file.
* NEWS: New file.
* README: New file.
* bootstrap.sh: New file.
* configure.ac: New file.
* createdb.sql: New file.
* sqltypes.sed: New file.
# isoonline - Backup static hierarchies to ISO images with online index.
# Copyright (C) 2003 Per Cederqvist
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
## Process this file with ./bootstrap.sh.
MYSQL = @MYSQL@
pkgpython_PYTHON = scanner.py
all:
recreate_db: Makefile $(srcdir)/sqltypes.sed $(srcdir)/createdb.sql
sed -f $(srcdir)/sqltypes.sed < $(srcdir)/createdb.sql \
| $(MYSQL)
optimize_db: Makefile $(srcdir)/sqltypes.sed $(srcdir)/optimize.sql
sed -f $(srcdir)/sqltypes.sed < $(srcdir)/optimize.sql \
| $(MYSQL) gpgpathfinder
NEWS 0 → 100644
Nothing to report yet.
README 0 → 100644
Yet another CD-R backup utility.
Features: the files to be backed up are permanent files that are never
removed or altered (such as your photo album or music collection).
Each file is saved on at least two different ISO images. An on-line
index keeps track of all ISO images and all files. The index contains
an SHA-1 fingerprint of each file, for easy verification of both the
online files and the ISO images. The system keeps track of when each
media was last verified.
The name "isoonline" is a very bad one. Google finds 1330 matches (as
of 2003-04-18). But I need a name -- any name -- to be able to create
a CVS repository. If I ever make a release of this I will probably
have to come up with a better name, but for now, the highest priority
is to make a backup copy of my photos. Figuring out a good name for
the backup system will have to wait.
Installation
============
Log in as the mysql "root" user and run this command, substituting
"ceder" to whatever name you plan to run the program as:
GRANT ALL ON isoonline.* to ceder@localhost;
Then do the normal "./configure && make && make install" thing.
Finally, if this is a first-time install, run "make recreate_db".
Bootstrapping from CVS
======================
Use the bootstrap.sh script to create a configure script.
#!/bin/sh
#
# This file is probably useful only to the maintainer.
# Create "configure" and all the files it needs.
# This file was created by Per Cederqvist and placed in the public domain.
aclocal
autoconf
# autoheader
automake -a
dnl isoonline - Backup static hierarchies to ISO images with online index.
dnl Copyright (C) 2003 Per Cederqvist
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
dnl Process this file with ./bootstrap to produce a configure script.
AC_INIT(isoonline.cfg)
AM_INIT_AUTOMAKE(isoonline, 0.0)
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AM_PATH_PYTHON
AC_PATH_PROG(MYSQL, mysql, nomysql)
[if test "$MYSQL" = nomysql
then]
AC_ERROR([cannot find mysql in \$PATH, which is set to $PATH])
[fi]
AC_OUTPUT(Makefile)
# Create the database tables needed by isoonline. Please note that
# this removes the database if it already exists.
drop database if exists isoonline;
create database isoonline;
use isoonline;
create table base (
dir_id int64 auto_increment primary key not null,
dir_name varchar(255) not null,
active bool not null,
last_scanned datetime null,
first_scanned datetime null,
UNIQUE(dir_name),
INDEX(active, last_scanned)
);
create table file (
file_id int64 auto_increment primary key not null,
filename varchar(255) not null,
dir_id int64 not null references base(dir_id),
ctime datetime not null,
atime datetime not null,
size int64 not null,
md5sum char(32) not null,
INDEX(filename),
UNIQUE(filename, size, ctime, atime, md5sum),
INDEX(md5sum),
INDEX(size)
);
create table media (
media_id int32 auto_increment primary key not null,
written datetime not null,
verified datetime null,
broken bool not null,
INDEX(written),
INDEX(verified)
);
create table contents (
media int32 not null references media(media_id),
file int64 not null references file(file_id),
INDEX(file),
INDEX(media)
);
s/[ ][ ]*/ /g
s/bool/tinyint unsigned/g
s/uint8/tinyint unsigned/g
s/uint16/smallint unsigned/g
s/uint24/mediumint unsigned/g
s/uint32/integer unsigned/g
s/uint64/bigint unsigned/g
s/int8/tinyint/g
s/int16/smallint/g
s/int24/mediumint/g
s/int32/integer/g
s/int64/bigint/g
s/#.*//g
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment