namityadav
Programmer
I have to write a script that will be executed periodically to copy files from a remote server, and will have to do the following:
1. Check the disk space on local server, find out how much free disk space is available for the copying (We can assume that the copying can take 90% of the total free disk space on local server)
2. Use scp to copy the files (Keys are already set) from the remote machine
What we have to note is: Due to performance issues of the ssh tunnels, it'll be better to copy the files over in one go. One possible problem, in that case, is that if there are too many files on remote machine, then we should figure out how many files we can copy ( and what files are those? ).
Any suggestions?
1. Check the disk space on local server, find out how much free disk space is available for the copying (We can assume that the copying can take 90% of the total free disk space on local server)
2. Use scp to copy the files (Keys are already set) from the remote machine
What we have to note is: Due to performance issues of the ssh tunnels, it'll be better to copy the files over in one go. One possible problem, in that case, is that if there are too many files on remote machine, then we should figure out how many files we can copy ( and what files are those? ).
Any suggestions?