Quote:
Originally Posted by chrism01
If you really want a different copy every night, you can rename the target with today's date
date '+%Y%m%d'
|
Thanks for your replies.
To sketch the situation; Now there is a remote samba backup server containing lots of SQL database files: .bak, .mdf files etc.
Here, on location, we have a server that should be synced with this samba via FTP. File wise.
On the remote samba server the files are constantly updated and already have the filename %data%_%hour%_%databasename%.bak
Something like:
Code:
BELGsdsM_TRAININGS_23-10-2009_10h01.bak
BELGsdsM_TRAININGS_23-10-2009_18h01.bak
etc
The script runs on yet another remote server.
The actions that I would need are
1. Connect via FTP to source server
2. Connect via FTP to dest. server
3. Possibly compare the files between source and dest.
4. transfer the files recursively (no overwriting)
5. close connections
What I have are the 1st, 2nd and 5th step. I would really appreciate a solution. Didn't find a lot on the web so I'm sure others will be helped by it too.
Thanks in advance!