Skip to content

Comments

SCP sync to remote SSH server such as AWS#241

Open
oztimpower wants to merge 1 commit intoTheCrypt0:masterfrom
oztimpower:master
Open

SCP sync to remote SSH server such as AWS#241
oztimpower wants to merge 1 commit intoTheCrypt0:masterfrom
oztimpower:master

Conversation

@oztimpower
Copy link

@oztimpower oztimpower commented Jun 6, 2020

Script to run from cron that can sync the recordings to a target SSH server via scp.

Generate a rsa key via:
dropbearkey -t rsa -f /home/yi-hack-v4/.ssh/transfer-key

Edit the config file with destination path, user, and hostname:
vi /home/yi-hack-v4/etc/push.conf

Copy the public key to your target server $HOME/.ssh/authorised_keys via:
dropbearkey -y -f /home/yi-hack-v4/.ssh/transfer-key

Execute /home/yi-hack-v4/script/push.sh -h to sync the recordings for that hour from cron. It will only publish files that have changed, you can run every minute if you wanted to.

eg. */10,59 * * * * /home/yi-hack-v4/script/push.sh -h

Files are synced using the -h option for the hour that they run. If at the end of the hour a sleep is done to ensure all files are written and copied.

@oztimpower oztimpower force-pushed the master branch 2 times, most recently from 329a67a to 23e3dd4 Compare June 7, 2020 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant