Continuous data protection for GNU/Linux (cdpfgl).
C Shell M4 Other
Failed to load latest commit information.
client Changes the way to call open_database function Feb 18, 2017
dockerfiles Adds 'file' program in order to build more properly. Apr 15, 2016
docs Changes version number for doxygen documentation to 0.0.10 Jan 16, 2017
libcdpfgl Now gets internal client database version when opening it. Feb 18, 2017
man Adds a note about -n, --hostname option in cdpfglrestore's man page. Jan 4, 2017
manual Replacing ``` by ` for inline code in manual/ file. Sep 7, 2016
packaging Releases v0.0.10 Nov 29, 2016
pixmaps Adds pixmaps and build system to add them into dist file. Jan 21, 2016
po Releases v0.0.10 Nov 29, 2016
restore We're now in 2017 ! Jan 11, 2017
server We're now in 2017 ! Jan 11, 2017
tests We're now in 2017 ! Jan 11, 2017
tools We're now in 2017 ! Jan 11, 2017
.gitattributes Adds a / at packaging to help remind that it is a directory May 6, 2016
.gitignore Releases v0.0.10 Nov 29, 2016
.travis.yml Sqlite version change in travis's build system. Aug 24, 2016
AUTHORS Happy new year ! Jan 3, 2016
COPYING configure and make does work with this basic skeleton Feb 15, 2014
ChangeLog ChangeLog file is not maintained because one can get the changelog using Sep 22, 2015
INSTALL We are going to use gio so we have to init types Feb 15, 2014
LICENSE Initial commit Feb 15, 2014 Now installs and ships man pages on the system and in tarball files r… Aug 30, 2016
NEWS Corrects the link that refers to a wrong version. Dec 7, 2016
README renamed README in to be github compliant and created a Feb 27, 2014 Adds Github's milestones to file. Dec 26, 2016
TODO Some ideas to implement later. Mar 17, 2016 Replaces 'sauvegarde' with cdpfgl (There is still a lot to do). Dec 5, 2015 Replaces 'sauvegarde' with cdpfgl (There is still a lot to do). Dec 5, 2015
client.conf Adds 'no-scan' boolean file configuration key to client.conf. Sep 11, 2016 Automatically inserting last git hash into the version's string Mar 7, 2015 Releases v0.0.10 Nov 29, 2016
releases.sha256 Releases v0.0.10 Nov 29, 2016
restore.conf Replaces 'Serveur' section name by 'Server' for coherence. Dec 31, 2015
server.conf Replaces 'Serveur' section name by 'Server' for coherence. Dec 31, 2015

cdpfgl: Continuous data protection for GNU/Linux

This page is cdpfgl's doxygen's @mainpage.

cdpfgl Version Build Status Gitter

With this code you can backup and restore files in a live and continuous way. Compile the code put the cdpfglserver on the machine where you want to save your files. Let cdpfglclient crawl your files to save them. If needed use cdpfglrestore to restore a file.


This is free software and real open source as GPLv3 is used for this collection of programs and Creative Commons Attribution-ShareAlike 4.0 is used for the artwork. You'll find a LICENSE file in this directory for the programs (GPL v3) and one in the pixmaps directory for the artwork (CC-BY-SA 4.0).

Feel free to contribute to cdpfgl's project and/or give help to the projects used here (see dependencies section below).



This project depends on the following projects (minimum version required is stated between () and recommended version between []):

  • autotools (2.59)
  • glib and gio (2.34)
  • libmicrohttpd (0.9.5) [0.9.46]
  • libcurl (7.22.0)
  • sqlite (3.7.15)
  • jansson (2.5) [2.7]

jansson's library version is quite recent but it compiles nicely and depends on nothing (as far as I know). Compiling cdpfgl also needs gnutls development files (used by libmicrohttpd). Please have a look at .travis.yml file in order to see how to compile dependencies before compiling cdpfgl.

cdpfgl's project is known to compile (sometimes at the expense of recompiling and installing newer versions of dependencies) and run under Centos 7, Debian Jessie, Ubuntu 12.04 LTS, VoidLinux and raspbian 3 and on x86_64 and arm7l architectures. Please let me know if you have compiled cdpfgl successfully in a system that is not listed here.


  • doxygen (1.6.1) is used to generate code's documentation.
  • gnuplot (4.6) is used to generate graphs for the documentation.
  • gource (0.43) is used to generate the video about project's life in git
  • pandoc ( is used to generate a .tex and then a .pdf from .md manual files. It is also used to generate man pages from .md files in 'man' directory.


You can download the source code from github or a packed defined version at


If you had the code from the git repository you may generate the configure script by invoking ./ script. It will execute aclocal, libtoolize automake, autoconf, glib-gettextize and intltoolize for you. If everything went ok you should have an executable configure script that you may use in the classic way:

./configure --prefix=/my/local/install --enable-debug
make install

If you need more information about how to install cdpfgl you can also have a look at the installation manual.


The server (the one that collects everything)

First you need to run the program cdpflgserver on a machine that will act as a server. You can configure options in server.conf (located by default in {prefix}/etc/cdpfgl/) or use the command's line options as shown in cdpfglserver man page.

The client (the one that saves your files).

Then you may use cdpfglclient program to report modified files to the server and save them accordingly. Configuration file is named client.conf and command line options are documented in cdpfglclient man page.

The restore program (the one that saves your life when needed)

At a time you may need to restore a file then you'll have to use cdpfglrestore program. Configuration file is named restore.conf and command line options are documented in cdpfglrestore man page.


If you need more than the above hints, please have a look at the user manual.


I am coding on spare hours so I may not tell any release dates and you should consider that "It ships when its ready".

  • 0.0.11 have some statistics with the server.
  • 0.0.12 Use compression in file_backend.
  • 0.0.13 Add some security between clients and server to avoid sending plain clear text messages.
  • 0.0.14 Modify file_backend to store meta data into a database
  • 0.0.15 Add a new backend that will store things into an object storage.


  • 0.0.1 [08.07.2015] First usable version
  • 0.0.2 [15.08.2015] client redesigned
  • 0.0.3 [21.08.2015] saves and restores links
  • 0.0.4 [06.09.2015] new server url to post a bunch of hashs and associated data. Clean the answer list of needed hashs to avoid having duplicated hashs into it.
  • 0.0.5 [04.10.2015] fanotify's code reviewed. Avoid having one entire file in memory.
  • 0.0.6 [02.11.2015] restore to some specific place. client adaptive blocksize with option to choose fixed or adaptive. Add options to choose CLIENT_MIN_BUFFER.
  • 0.0.7 [03.01.2016] Ability to exclude some files by extension or path. Caching mechanism in client in case the server is unreachable. Change GSList hash_data_list from meta_data_t structure to something that allows deletion of elements while walking through it.
  • 0.0.8 [27.04.2016] restore the latest version of a file before a specific date. Add a new post url such as (Hash_Array.json) to submit an array of hashs to server that will say which hashs are needed. Avoids sql injection in sqlite queries.
  • 0.0.9 [24.08.2016] New GET url in order to get a bunch of hashs and their associated data to go quicker when restoring files. Restore all the versions of a file. Now cdpfglclient handles signals and should close its database connection cleanly.
  • 0.0.10 [29.11.2016] restore a directory and it's subfiles and directories at a specific date. Write a man page for each programs.

Code documentation

If you are interested in helping the project please have a look at file. Some inside insights are in the infrastructure documentation as well for the API part.