-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2007-2008 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * When creating backup snapshots, maintain a local database of data blocks and
+ * Copyright (C) 2007-2008 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* When creating backup snapshots, maintain a local database of data blocks and
* checksums, in addition to the data contents (which may be stored remotely).
* This database is consulted when attempting to build incremental snapshots,
* as it says which objects can be reused.
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2007-2008 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * When creating backup snapshots, maintain a local database of data blocks and
+ * Copyright (C) 2007-2008 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* When creating backup snapshots, maintain a local database of data blocks and
* checksums, in addition to the data contents (which may be stored remotely).
* This database is consulted when attempting to build incremental snapshots,
* as it says which objects can be reused.
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2007-2008 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * Handling of metadata written to backup snapshots. This manages the writing
+ * Copyright (C) 2007-2008 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Handling of metadata written to backup snapshots. This manages the writing
* of file metadata into new backup snapshots, including breaking the metadata
* log apart across separate objects. Eventually this should include unified
* handling of the statcache, and re-use of metadata between snapshots.
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2007-2008 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * Handling of metadata written to backup snapshots. This manages the writing
+ * Copyright (C) 2007-2008 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Handling of metadata written to backup snapshots. This manages the writing
* of file metadata into new backup snapshots, including breaking the metadata
* log apart across separate objects. Eventually this should include unified
* handling of the statcache, and re-use of metadata between snapshots.
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2007 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * Backups are structured as a collection of objects, which may refer to other
+ * Copyright (C) 2007 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Backups are structured as a collection of objects, which may refer to other
* objects. Object references are used to name other objects or parts of them.
* This file defines the class for representing object references and the
* textual representation of these references. */
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2007 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * Backups are structured as a collection of objects, which may refer to other
+ * Copyright (C) 2007-2008 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Backups are structured as a collection of objects, which may refer to other
* objects. Object references are used to name other objects or parts of them.
* This file defines the class for representing object references and the
* textual representation of these references. */
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2008 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * Backup data (segments and backup descriptors) may be stored on a remote
+ * Copyright (C) 2008 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Backup data (segments and backup descriptors) may be stored on a remote
* fileserver instead of locally. The only local storage needed is for the
* local database and some temporary space for staging files before they are
* transferred to the remote server.
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2008 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * Backup data (segments and backup descriptors) may be stored on a remote
+ * Copyright (C) 2008 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Backup data (segments and backup descriptors) may be stored on a remote
* fileserver instead of locally. The only local storage needed is for the
* local database and some temporary space for staging files before they are
* transferred to the remote server.
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2006-2008 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * Main entry point for LBS. Contains logic for traversing the filesystem and
- * constructing a backup.
+ * Copyright (C) 2006-2008 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/* Main entry point for LBS. Contains logic for traversing the filesystem and
+ * constructing a backup. */
+
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
/* sha1.cc - Functions to compute SHA1 message digest of data streams
- according to the NIST specification FIPS-180-1.
-
- Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
- Copyright (C) 2006-2007 Michael Vrable
-
- 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* Written by Scott G. Miller
- Credits:
- Robert Klep <robert@ilse.nl> -- Expansion function fix
-
- Modified by Michael Vrable <mvrable@cs.ucsd.edu> to simplify the interface
- and add an object-oriented wrapper. Original code (in C) taken from GNU
- coreutils (Debian package 5.97-5).
-*/
+ * according to the NIST specification FIPS-180-1.
+ * part of Cumulus: Smart Filesystem Backup to Dumb Servers
+ *
+ * Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
+ * Copyright (C) 2006-2007 The Regents of the University of California
+ * Written by Scott G. Miller
+ * Additional Credits:
+ * Robert Klep <robert@ilse.nl> -- Expansion function fix
+ * Modifications by Michael Vrable <mvrable@cs.ucsd.edu> to integrate into
+ * Cumulus.
+ *
+ * Original code (in C) is taken from GNU coreutils (Debian package 5.97-5).
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#include "sha1.h"
-/* Declarations of functions and data types used for SHA1 sum
- library functions.
- Copyright (C) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
- Copyright (C) 2006-2007 Michael Vrable
-
- 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+/* Declarations of functions and data types used for SHA1 sum library
+ * functions.
+ * part of Cumulus: Smart Filesystem Backup to Dumb Servers
+ *
+ * Copyright (C) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
+ * Copyright (C) 2006-2007 The Regents of the University of California
+ *
+ * Original code (in C) is taken from GNU coreutils (Debian package 5.97-5).
+ * Modifications by Michael Vrable <mvrable@cs.ucsd.edu> to integrate into
+ * Cumulus.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#ifndef SHA1_H
# define SHA1_H 1
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2008 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * Backup data is stored in a collection of objects, which are grouped together
+ * Copyright (C) 2008 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Backup data is stored in a collection of objects, which are grouped together
* into segments for storage purposes. This implementation of the object store
* represents segments as TAR files and objects as files within them. */
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2006-2008 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * Backup data is stored in a collection of objects, which are grouped together
+ * Copyright (C) 2006-2008 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Backup data is stored in a collection of objects, which are grouped together
* into segments for storage purposes. This implementation of the object store
* represents segments as TAR files and objects as files within them. */
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2007 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * Utility functions for converting various datatypes to text format (and
- * later, for parsing them back, perhaps).
+ * Copyright (C) 2007 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/* Utility functions for converting various datatypes to text format (and
+ * later, for parsing them back, perhaps). */
+
#include <stdio.h>
#include <uuid/uuid.h>
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2007 Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
*
- * Utility functions for converting various datatypes to text format (and
- * later, for parsing them back, perhaps).
+ * Copyright (C) 2007 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/* Utility functions for converting various datatypes to text format (and
+ * later, for parsing them back, perhaps). */
+
#ifndef _LBS_FORMAT_H
#define _LBS_FORMAT_H