Giter Site home page Giter Site logo

back's Introduction

back

A script to assist with backing up individual files and directories.

Usage: back [options] file1 dir1 file2

Options:

     -h, --help show this help message and exit
     -f FROM_ROOT, --from=FROM_ROOT Use this as the source root
     -t TO_ROOT, --to=TO_ROOT Use this as the backup root
     --push Look in the sources for root of file
     --pull Look in the destinations for root of file

Perhaps this is best explained by example.

With three directories:

     /tmp/foo
     /tmp/bar
     /tmp/baz

Where /tmp/foo has some directories and files in it:

     /tmp/foo/monkey
     /tmp/foo/pirate
     /tmp/foo/ninja/samurai

You might want to rsync from /tmp/foo to /tmp/bar

     rsync /tmp/foo /tmp/bar

That would make /tmp/bar/foo. I make this mistake all the time.

So, create a file ~/.back.ini with the contents

     [/tmp/foo]
     dest=/tmp/bar

Running this command:

     back /tmp/foo/

would cause back to look up /tmp/foo in the ini, see that it is a source root, and correctly rsyncs it. Obviously, that is a trivial case, but a more interesting case is when you are recovering files from a failing drive or migrating from one directory to another -- you can set up your source and destination, change into the source, and copy over just the files you want.

     cd /tmp/foo
     back monkey
     back ninja/samurai

back's People

Contributors

jmullan avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.