Rev 6408 |
Show entire file |
Ignore whitespace |
Details |
Blame |
Last modification |
View Log
| RSS feed
| Rev 6408 |
Rev 6411 |
| Line -... |
Line 1... |
| - |
|
1 |
#!/bin/sh
|
| - |
|
2 |
#This script is used to send the latest of all database backups
|
| - |
|
3 |
#to the test machine to be restored there.
|
| - |
|
4 |
#First argument is the path to backup files and second is target machine.
|
| 1 |
file=`find /backup/Prod-DB-backup/.backup -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "`
|
5 |
file=`find $1 -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "`
|
| 2 |
echo $file
|
6 |
echo $file
|
| 3 |
scp $file root@$1:/root/
|
7 |
scp $file root@$2:/root/
|