Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.51 KB

README.md

File metadata and controls

48 lines (32 loc) · 1.51 KB

pdsync

personal data sync script. Script that backups folder on an external hard drive and also upload them to S3. By default all the logs go to the /tmpfolder.

usage

pdsync.sh -d /backup /home/user/folder1 /home/user/folder2
pdsync.sh -d "/media/backups" -s s3://my-backups /home/user1/Videos /home/user1/Documents /home/user1/Pictures /home/user1/projects
pdsync.sh -d "/media/backups" -s s3://my-backups -f -t /home/user1/transition_folder /home/user1/Videos /home/user1/Documents /home/user1/Pictures /home/user1/projects

On crons define the XDG_RUNTIME_DIR so the cron can send the notification

* * * * * XDG_RUNTIME_DIR=/run/user/$(id -u) pdsync.sh -d "/remote/backup" -p 5  -s s3://my-backups /home

gpg encryption

pdsync use gpg encryption, so this is a basic way to encrypt/decrypt files

encrypt

gpg --encrypt --sign --armor -r <email> --passphrase-file <passphrase_file> -o <destination> file_name

decrypt

gpg file_name.asc

Some documentation about gpg

Installation

curl -o- https://raw.githubusercontent.com/jegj/pdsync/v1.6.1/install.sh | bash

Install the script at $HOME/.local/bin/pdsync