Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/discretetom/batcave
Backup PC files in AWS S3.
https://github.com/discretetom/batcave
Last synced: about 1 month ago
JSON representation
Backup PC files in AWS S3.
- Host: GitHub
- URL: https://github.com/discretetom/batcave
- Owner: DiscreteTom
- License: mit
- Created: 2022-04-28T07:18:14.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-10-25T11:10:29.000Z (about 2 years ago)
- Last Synced: 2024-09-14T11:51:28.929Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 229 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Batcave
[![npm](https://img.shields.io/npm/v/@discretetom/batcave?style=flat-square)](https://www.npmjs.com/package/@discretetom/batcave)
Use AWS S3 as a file backup service.
## Installation
```bash
npm install -g @discretetom/batcave
```## Usage
Create a file e.g. `backup.yml` with the following content:
```yml
storage:
bucket: BUCKET_NAME # s3 bucket name
prefix: PREFIX/ # s3 key prefix
profile: default # local aws profile
region: us-east-1 # region of your s3 bucket
class: STANDARD # s3 storage class
upload:
# specify local path and remote path
# local path can use `~` as the home dir
# for windows, the home dir is like 'C:/Users/xxx'
- local: ~/Documents
remote: Documents
# you can specify local only
# then the remote will be the direct folder name
# in this case, the remote will be `Videos`
- local: ~/Videos
# all `\` in local will be replaced to `/`
# so it's ok to use `\` in local
- local: ~\Pictures
# remote path must be unique
# so the following `remote` will throw an error
# `Duplicated remote path: Documents`
- local: /home/ubuntu/doc
remote: Documents
# you can use glob filters to filter files
- local: /home/ubuntu/Musics
filters:
- exclude: "*" # use glob expression to exclude files
- include: "*.mp4" # use include to escape from exclude
# same rules as the upload
# by default, download tasks will be executed after upload tasks
download:
- local: ~/Documents
filters: # global filters
- exclude: "**/node_modules"
```Then you can use `batcave backup.yml` to backup your files.
Add the option `--dry` to displays the operations that would be performed using the specified command without actually running them.