dupver

command module
v0.5.1-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2020 License: BSD-2-Clause Imports: 1 Imported by: 0

README

Go

Dupver

Dupver is a minimalist deduplicating version control system in Go based on the Restic chunking library. It is most similar to the binary version control system Boar https://bitbucket.org/mats_ekberg/boar/wiki/Home, and to a lesser extent the commercial offering Perforce, though it borrows design conventions from the deduplicating backup applications Duplicacy, Restic and Borg. Dupver does not track files, rather it stores snapshots more like a backup program. Rather than traverse directories itself, Dupver uses an (uncompressed) tar file as input. Not that only tar files are accepted as input as Dupver relies on the tar container to

  1. provide the list of files in the snapshot
  2. store metadata such as file modification times and permissions

Dupver uses a centralized repository to take advantage of deduplication between working directories. This means that dupver working directories can also be git repositories or subdirectories of git repositories.

Dupver has not been tested on repository sizes more than a few GB, but it is expected to scale up to the low 100's of GB.

Setup

Binary releases are provided for MacOS/Linux/Windows. Copy them somewhere in your path. To build from source run go build or go install.

Update repos to v0.4 format

  1. Add prev pointers to snapshot files
  2. Add branch & head pointers
  3. Convert snapshot filenames to drop date

TODO

  • check that branch cannot be called head. this check may not be needed anymore
  • fix writing head from outside of wd
  • remove auto-generated tar files after chunking
  • use toml for heads and branches?

Usage

Initialize repository

Initialize a repository with dupver repo init repo_path

Initialize project working directory

From inside the working directory dupver -r repo_path init -p project_name

Or from the parent directory dupver -r repo_path init -p project_name working_directory

Commit

Stage your files by adding them to aø tar file

tar cfv tarfile.tar file1 file2 file

Commit the tarfile with dupver commit -m "commit message" tarfile.tar

List commits

List all commits dupver log

List a specific commit dupver log commit_id

Check if files are modified/added

dupver status

Restore

Restore another commit dupver checkout commit_id

Restore to a particular file dupver checkout -o filename.tar commit_id

Documentation

Overview

Copyright © 2020 Art Barnes <art@pin3.io> All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  1. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Directories

Path Synopsis
src
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL