Giter Club home page Giter Club logo

sleep-easy's Introduction

About

Rest API build in Java that creates local, compressed backups for your cloud accounts (Google, Dropbox, OneDrive, etc).

The following scenarios demonstrate why this could be useful.

  • Someone gets the credentials to your cloud account (Google, Dropbox, OneDrive), deletes all your documents, and empties the trash.
  • You permanently delete an email, certain that you'll never need it again. A few days later, you realize that you do, in fact, need the email.
  • You need to access a document saved in the cloud, but your cloud provider's website is down and you have no local copy of the document.

What now?

The best option might be to recover from a physical backup that is stored locally or on a separate cloud account. Unfortunately, many cloud providers do not natively support this sort of backup, and creating them manually can be time-consuming and tedious. This program intends to solve this problem by automating backups for many popular cloud services, allowing users to sleep easy again.

Features [WIP]

  • Secure Authorization to cloud accounts
  • Compressed backups
  • Incremental and full backups
  • Option to configure backup schedule
  • Summary and alerts emails

Requirements:

Java 1.8

  • Path to Java binary should be /usr/bin/java.
    • Edit com.sleep.plist if it's not Gradle

Running the program:

See the 'Usage' Wiki

File types:

Below are the default file types that Google files are converted to. These can be changed in GFile.java

  • Google Docs --> .docx
  • Google Sheets --> .csv
  • Google Slides --> .pptx //TODO file in the whole list

Logs

  • Launchd logs are sent to /tmp/sleep-easy-backups/logs/
  • App logs are saved in $DRIVE_HOME/logs

Known limitations:

  • Filename cannot include /s.
  • Google Sheets can be saved as CSVs or XLSX files, but not both
  • exported content is limited to 10MB (DriveApi)
  • By default, the compressed backups are saved to $HOME/sleep-easy-backups/backups. To change this, edit the DRIVE_HOME and BACKUP_DIR valeus in DownloaderSettings.java.

Third-Party Documentation

  • Launchd (runs program as daemon on OSX)

References

Other develeoper's related implementations that I found helpful

Auth:

https://github.com/smarx/othw

HTTP server:

https://www.logicbig.com/tutorials/core-java-tutorial/http-server/http-server-basic.html

oAuth

sleep-easy's People

Contributors

thitzeman avatar

Watchers

James Cloos avatar

sleep-easy's Issues

Cleanup dependencies

Eliminate unneeded dependencies in build.gragle of addFilesToBackupDir module

Get gradle imports and code calls working

everything broken now
- try setting gradle/home in IntelliJ's project settings
- import Gson
- Manually add library if needed
- switch to Maven if causing too much issues

Create Demo YouTube videos

Part I: Overview

  • Discuss core features
  • Explain how to install and use

Part II: Technical Stuff

  • Code review
  • Show Tests
  • Where things could be improved
  • Ask for feedback

basic auth implementation with DropBox

Start: Finish copying oAuth's DropboxOAuthHandler

  • Use Dropbox's OAuth authorization to programmatically authenticate SleepEasy as a Dropbox app
    • Get to work with the CMD example (bookmark, IDEA)
    • Convert CMD example to fully web-based oauth
    • Convert app secret into .json and save locally under ~/.credentials/sleepeasy-backups, like
      google's client_secret.json
  • See if DropBox Auth can work with only Write access (currently uses 'Full Dropbox' (read/write))

See:
- http://dropbox.github.io/dropbox-sdk-java/api-docs/v1.8.x/com/dropbox/core/DbxWebAuth.html#start()
- https://www.programcreek.com/java-api-examples/index.php?api=com.dropbox.core.DbxWebAuth

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.