Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sogladev/cronjobs-rsync-rclone-backups
Easy daily automated backups to local and remote drives with cronjobs, rsync and rclone
https://github.com/sogladev/cronjobs-rsync-rclone-backups
Last synced: about 1 month ago
JSON representation
Easy daily automated backups to local and remote drives with cronjobs, rsync and rclone
- Host: GitHub
- URL: https://github.com/sogladev/cronjobs-rsync-rclone-backups
- Owner: sogladev
- Created: 2022-03-10T14:18:17.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-27T14:35:27.000Z (10 months ago)
- Last Synced: 2024-05-09T16:12:34.051Z (8 months ago)
- Language: Shell
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cronjobs-rsync-rclone-backups
Automated backups to local and remote drives with cronjobs, using rsync and rcloneWe can specify which files to upload with filters (`*.txt`) and upload to multiple cloud drives with variable data cap limits
In the end crontab will look like this with easy expansion of drives and selection of files to backup
## Requirements
* Crontab
* rsync
* [Rclone](https://rclone.org/)## Setup
- [ ] create rsync directories for local backup
- [ ] setup rclone for remote backup with remote accounts (onedrive, googledrive, mega, etc.)
- [ ] create filters (`.txt`)
- [ ] edit `crontab -e`
### rsync
Configure $DRIVE and edit filter as neededcreate folders if they do not exist
```
DRIVE=/media/${USER}/Backups/${FREQUENCY}
create
/media/user/Backups/weekly/
/media/user/Backups/daily/
```### [Rclone](https://rclone.org/)
Install Rclone https://rclone.org/install/
Setup remote account(s), my preference https://mega.nz/
Step through Configuration with `rclone config` specific to type of Storage. See docs for specific instructions https://rclone.org/docs/
We can call `rsync.sh` and fill in Drive and Files (filter)
`export DRIVE=user_mega; export FILES=critical;"$CRONJOBS"/rclone.sh`
Refreshing tokens:
Needed for onedrive. `rclone config` Select onedrive -> have token (y/n) --y--> opens browser for sign in### What to backup? Defining filters
Filters for rclone `filter_critical.txt` defined as `filter_{FILES}.txt`## Put filters and scripts in their locations
Put `*.sh` scripts and filters `*.txt` in `~/scripts/cronjobs`