Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/HolgerHees/cloudsync
Sync a local filesystem on linux, windows and osx incremental and encrypted with google drive simliar to rsync. You can also restore the encrypted data back to a local filesystem. It works as a complete backup solution for your private data.
https://github.com/HolgerHees/cloudsync
Last synced: 2 months ago
JSON representation
Sync a local filesystem on linux, windows and osx incremental and encrypted with google drive simliar to rsync. You can also restore the encrypted data back to a local filesystem. It works as a complete backup solution for your private data.
- Host: GitHub
- URL: https://github.com/HolgerHees/cloudsync
- Owner: HolgerHees
- License: gpl-2.0
- Archived: true
- Created: 2014-07-02T15:36:44.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-10-04T06:42:40.000Z (over 2 years ago)
- Last Synced: 2024-08-02T01:26:26.832Z (6 months ago)
- Language: Java
- Homepage: http://www.intranet-of-things.com/smarthome/infrastructure/server/cloudsync/
- Size: 9.92 MB
- Stars: 176
- Watchers: 20
- Forks: 27
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-repositories - HolgerHees/cloudsync - Sync a local filesystem on linux, windows and osx incremental and encrypted with google drive simliar to rsync. You can also restore the encrypted data back to a local filesystem. It works as a comple (Java)
README
# cloudsync
**This project is obsolete and inactive. I recommend to use [rclone](https://rclone.org/) as a much more powerful alternative. If you are interested to takeover the ownership. Feel free to contact me.**
Sync a local filesystem on linux, windows and osx incremental and encrypted with google drive simliar to rsync. You can also restore the encrypted data back to a local filesystem. It works as a complete backup solution for your private data.
Other compareable backup solutions like [duplicity](http://duplicity.nongnu.org) upload one big encrypted 'base' archive with additional delta archive files. After a few months you must upload a new fresh 'base' archive to avoid hundreds of delta files. This approach, while widely used in various backup solutions, is problematic for private async DSL connections. To solve these issues each file is encrypted and uploaded separately.
To get a first impression you should take a look at [this screenshot](https://github.com/HolgerHees/cloudsync/wiki/Home).
The encryption is based on OpenPGP with AES 256 (optional) and a passphrase. It is possible to decrypt uploaded files with a normal OpenPGP compatible tool like 'gpg' or 'gpg2'.
Encrypted data includes:
- filetype [folder,file,symlink]
- filecontent, filename and original filesize
- createtime, modifytime and accesstime
- owner, group, posix permissions, acl entries and fat32 attributes
- md5 checksumFilechanges are detected by comparing the file metadata. It uses a local cachefile to speedup the incremental update. The local cachefile is completly restoreable by analysing the serverside archived metadata.
Supported Services are:
- Google Drive (stable)
- Remote mounted filesystem (beta)
- Dropbox (alpha preview)To provide additional cloud targets like Amazon Cloud Drive or Microsoft OneDrive just implement 6 functions from the interface [Connector.java](https://github.com/HolgerHees/cloudsync/tree/master/src/main/java/cloudsync/connector/RemoteConnector.java).
## Requirements
1. Java >= 7
2. [Java Cryptography Extension (JCE)](http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html) (optional to support AES256)
3. [Maven](http://maven.apache.org/download.cgi)## Install
```bash
git clone https://github.com/HolgerHees/cloudsync.git
cd cloudsync
mvn install
```## Config
To use, copy ```'config/cloudsync.config.default'``` to ```'config/cloudsync.config'``` and set the following;
- `PASSPHRASE`: your master password used for encrypt/decrypt
There are two authentication options, either using an Installed Application or Service Account.
Both options require that you [enable the Google Drive API](https://github.com/HolgerHees/cloudsync/wiki/Google-Drive-API).
### Installed Application
Follow [these instructions](https://github.com/HolgerHees/cloudsync/wiki/Google-Client-Credentials) to set the following;
- `GOOGLE_DRIVE_CLIENT_ID`
- `GOOGLE_DRIVE_CLIENT_SECRET`### Service Account
This process requires more configuration however will ensure you can run unattended.
1. [Create Service Account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount). You must ensure that you [delegate domain-wide authority to your service account](https://developers.google.com/drive/web/delegation#delegate_domain-wide_authority_to_your_service_account).
2. Download P12 keyfile.
3. Set the following in the configuration file.- `GOOGLE_DRIVE_SERVICE_ACCOUNT_EMAIL` - ie.. `@developer.gserviceaccount.com`.
- `GOOGLE_DRIVE_SERVICE_ACCOUNT_USER` - The Google Drive user, ie.. `[email protected]`.
- `GOOGLE_DRIVE_SERVICE_ACCOUNT_PRIVATE_KEY_P12_PATH` - The full or relative path to your P12 file.## Usage
To create a backup of '/data', call:
```./cloudsync --backup /data --name dataBackup```
to restore a backup into '/restore', call:
```./cloudsync --restore /restore --name dataBackup```
for a complete list of options, see below:
```
usage: cloudsync
-b,--backup Create or refresh backup of
-r,--restore Restore a backup into
-c,--clean Repair 'cloudsync*.cache' file and put leftover file into
-l,--list List the contents of an backup
-n,--name Backup name of --backup, --restore, --clean or --list
--config Config file path. Default is './config/cloudsync.config'
--followlinks How to handle symbolic links
- follow symbolic links if the target is outside from the
current directory hierarchy - (default)
- follow all symbolic links
- don't follow any symbolic links
--existing Behavior on files that exists localy during --restore
- stop immediately - (default)
- replace file
- skip file
- extend the name with an autoincrement number
--history Before remove or update a file or folder move it to a history folder.
Use a maximum of history folders
--include Include content of --backup, --restore and --list if the path matches the
regex based ^$. Multiple patterns can be separated with an '|'
character.
--exclude Exclude content of --backup, --restore and --list if the path matches the
regex based ^$. Multiple patterns can be separated with an '|'
character.
--permissions Behavior how to handle acl permissions during --restore
- set all permissions and ownerships - (default)
- ignores all permissions and ownerships
- ignores invalid and not assignable permissions and ownerships
--nocache Don't use 'cloudsync*.cache' file for --backup or --list (much slower)
--forcestart Ignore a existing pid file. Should only be used after a previous crashed
job.
--noencryption Don't encrypt uploaded data
--dry-run Perform a trial run of --backup or --restore with no changes made.
--progress Show progress during transfer and encryption.
--retries Number of network operation retries before an error is thrown (default:
6).
--waitretry Number of seconds between 2 retries (default: 10).
--network-error How to continue on network problems
- Throw an exception - (default)
- Show a command prompt (Y/n) to continue
- Show a warning and continue
--file-error How to continue on blocked files or permission problems
- Throw an exception - (default)
- Show a error log message
--logfile Log message to
--cachefile Cache data to
--min_tmp_file_size Minimum file size in bytes to use tmp files (default: 134217728)
-v,--version Show version number
-h,--help Show this help
```