mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-24 05:24:56 +00:00
10 lines
283 B
Bash
10 lines
283 B
Bash
|
#! /bin/bash
|
||
|
sshKey=$(<.sshKey)
|
||
|
serverBackupPath=$(<.serverBackupPath)
|
||
|
localPath=$(<.localBackupPath)
|
||
|
|
||
|
/bin/rsync -r -e "ssh -i $sshKey" "$serverBackupPath/files/*" "$localPath/files/"
|
||
|
|
||
|
# Delete files older than 30 days
|
||
|
find "$localPath/files" -type f -name "*.*" -mtime +30 -delete
|