Manage filesystem snapshots and allow undo of system modifications
Clone or download
scootergrisen and openSUSE Weblate Translated using Weblate (Danish)
Currently translated at 100.0% (189 of 189 strings)
Latest commit 7679bf3 Sep 16, 2018
Permalink
Failed to load latest commit information.
client comments from review May 15, 2018
data Use 'idle' IO and cpu scheduling class for cleanup service to prevent… Feb 5, 2018
dbus Link the dbus library with the boost libraries (Fixes #424) Sep 3, 2018
dists/debian - updated debian changelog Jul 25, 2018
doc comments from review May 15, 2018
examples support option --no-dbus for all snapper commands (#299) Dec 16, 2016
package - avoid setenv after fork (bsc#1107587) Sep 14, 2018
pam - implemented dbus string escaping in pam_snapper Jan 19, 2015
po Translated using Weblate (Danish) Sep 16, 2018
scripts - use python3 instead of python2 (bsc#1070324) Jan 10, 2018
server - use C++11 syntax Jul 24, 2018
snapper - avoid setenv after fork (bsc#1107587) Sep 14, 2018
testsuite-cmp Add boost linker flags to fix compilation under u16.04 Jul 17, 2016
testsuite-real support option --no-dbus for all snapper commands (#299) Dec 16, 2016
testsuite - fixed compilation if libbtrfs is missing Aug 2, 2016
.gitignore Improve Debian Packaging (#319) Jan 13, 2017
.travis.debian.sh Enable Travis CI, simplified Debian packaging (#318) Jan 13, 2017
.travis.fedora.sh Enable Travis CI, simplified Debian packaging (#318) Jan 13, 2017
.travis.leap.sh Enable Travis CI, simplified Debian packaging (#318) Jan 13, 2017
.travis.tumbleweed.sh Run the osc source validator Feb 6, 2017
.travis.ubuntu.sh Improve Debian Packaging (#319) Jan 13, 2017
.travis.yml Enable Travis CI, simplified Debian packaging (#318) Jan 13, 2017
AUTHORS - updated e-mail address Apr 7, 2016
COPYING - first steps handling snapshot info files Jan 10, 2011
Dockerfile.debian Update the distro versions used at Travis Jan 10, 2018
Dockerfile.fedora Update the distro versions used at Travis Jan 10, 2018
Dockerfile.leap Run the osc source validator Feb 6, 2017
Dockerfile.tumbleweed - updated docker file Jan 10, 2018
Dockerfile.ubuntu Update the distro versions used at Travis Jan 10, 2018
LIBVERSION - added function to query default snapshot May 9, 2017
Makefile.am - generate build file for Ubuntu 18.04 Jun 7, 2018
Makefile.ci Unify SUSE and Debian build Oct 13, 2016
Makefile.repo - detect lib64 Dec 13, 2013
README.Travis.md Enable Travis CI, simplified Debian packaging (#318) Jan 13, 2017
README.md Fix typo in README.md Feb 9, 2018
Rakefile Rakefile - fixed package autosubmit to Factory (#320) Jan 13, 2017
VERSION - fixed logging during shutdown Jul 23, 2018
configure.ac enable to set Global configuration file correctly Jan 27, 2018
snapper.spec.in - disable systemd unit install macros on non-SUSE Jan 12, 2018

README.md

Snapper

Build Status

Snapper is a tool for Linux file system snapshot management. Apart from the obvious creation and deletion of snapshots it can compare snapshots and revert differences between them. In simple terms, this allows root and non-root users to view older versions of files and revert changes.

For more information visit snapper.io.

Development

For compiling and developing Snapper you need to setup the development environment first.

Development Environment

In the SUSE Linux Enterprise and openSUSE distributions you can install the needed packages by using these commands:

# install the basic development environment (SUSE Linux Enterprise, the SDK extension is needed)
sudo zypper install -t pattern SDK-C-C++
# install the basic development environment (openSUSE)
sudo zypper install -t pattern devel_C_C++
# install the extra packages for snapper development (both SLE and openSUSE)
sudo zypper install git libmount-devel dbus-1-devel libacl-devel \
  docbook-xsl-stylesheets libxml2-devel libbtrfs-devel

Alternatively you can use a Docker container, see README.Travis.md file for some hints.

Building Snapper

You can download the sources and build Snapper by using these commands:

git clone git@github.com:<your_fork>/snapper.git
cd snapper
make -f Makefile.repo
# parallelize the build using more processors, use plain `make` if it does not work
make -j`nproc`

Installing and Running Snapper

To run the freshly built Snapper use this:

sudo make install
# kill the currently running DBus process if present
sudo killall snapperd
# try your changes (the DBus service is started automatically)
(sudo) snapper ...

Running Tests

Snapper includes some internal unit tests to avoid some bugs and regressions. The tests are located in the testsuite subdirectory and you can start them using the make check command.

There are also some additional tests in the testsuite-real subdirectory, but be careful. These tests really execute snapper commands and they can destroy your data! Run these tests only in a testing environment!

Releasing

  • Before releasing the Snapper package ensure that the changes made to the package are mentioned in the package/snapper.changes file, update also the dists/debian/changelog file.

  • Make sure the units tests still passes (see above).

  • When the version is increased then the Git repo has to be tagged, use the vX.Y.Z format for the tag. Also the filesystems:snapper OBS project has to be updated.

  • To create the package use command make package. Then use the common work-flow to submit package to the build service. For openSUSE:Factory send at first the package to the devel project YaST:Head in OBS.
    Please note that this OBS project builds for more distributions so more metadata files have to be updated. See the OBS documentation for more info (cross distribution howto, Debian builds).

  • The generated bzip2 tarball has to be also placed at ftp.suse.com/pub/projects/snapper.

  • When the documentation changes e.g. the man page or an important functionality then also the snapper.io web pages have to be updated. They are hosted as GitHub pages in the gh-pages branch in the Snapper Git repository.