Giter Club home page Giter Club logo

encrb's Introduction

encrb - encrypted remote backups

encrb backs up plaintext local directories to remote machine as encrypted, using encfs --reverse and rsync.

Example

$ ./encrb $HOME/documents $HOME/projects some.server.eu:/home/user/backups/

First run will generate a random password, save it to PASSFILE and prompt for encfs settings (pressing enter picks the defaults). Encfs KEYFILE is also created. Further runs will not require any user input.

Usage

$ ./encrb --help
Usage: encrb [options] dir-to-back-up1... remotepath

Options:
  -h, --help            show this help message and exit
  -k KEYFILE, --keyfile=KEYFILE
                        encfs keyfile to use [~/.encfs6-encrb.xml]
  -p PASSFILE, --passfile=PASSFILE
                        file containing encfs keyfile password [~/.encfs-
                        password]
  -b BWLIMIT, --bwlimit=BWLIMIT
                        Bandwidth limit (KiB/s) for rsync [0]

Backing up keyfile and password

Remember to back up the keyfile and the password! If you lose them, you will lose access to the encrypted data. Naturally you should not back up the keyfile to the same place where you put the actual backups. And it is a very good idea to have multiple backups of the keyfile (and password). For maximum security, keep the data, the keyfile and the password at different locations.

Running from crontab

You most likely want to run encrb from crontab. I recommend using flock or something similar to make sure no multiple instances are running, like this:

30 0 * * * flock -n /tmp/encrb.lockfile /path/to/encrb --bwlimit 100 $HOME/docs $HOME/projects some.server.eu:/home/user/backups/

Dependencies

  • encfs 1.7.4 or later
  • python
  • rsync

License

encrb is licensed under GPLv3, see http://www.gnu.org/licenses/gpl-3.0.html

encrb's People

Contributors

hoxu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

encrb's Issues

propagate exit status on failed rsync

Hi,
I have successfully been using encrb for quite some time now, it works greate. However, I just encountered a temporary dns problem with missing host name. This is what rsync said on stderr:

ssh: Could not resolve hostname example.com: Name or service not known
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.1]

and I believe the exit status of rsync in this case is nonzero. However, the encrb script does not seem to propagate that return status to its own return status. The relevant line of code is this one:
subprocess.call(['rsync', '-a .....

The consequence of this is that my crontab entry running encrb reports the synchronization as successful, even if it wasn't.

Can you please make sure encrb signals to its user when it encountered a problem?

Thanks,
Paul

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.