RSYNC script to transfer folders recursively without overwriting via FTP
Hi all,
I would need a bash script to sync/transfer folders recursively via FTP/RSYNC
(I initially planned to use FTP but I heard RSYNC would fit a lot better for this job(?))
The situation:
3 different Linux servers
1. source
2. destination - Samba
3. Server where the script runs on
As the files that have to be transferred are big database files (.bak, etc) overwriting (unnecessary traffic) should be avoided. Also no prompting because the script has to be 'cronned', to run nightly.
To sketch the situation more in detail; 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/RSYNC. File wise.
On the remote samba server the files are constantly updated and already have the filename %data%_%hour%_%databasename%.bak
Something like:
The script runs on yet another remote server.
The actions that I would need are
1. Connect via FTP/RSYNC? to source server
2. Connect via FTP/RSYNC? to dest. server
3. Possibly compare the files between source and dest. via the filename
4. transfer the files recursively (without overwriting)
5. close connections
Hi guys,
Don't really know much about unix or anything, just starting to mess around a little bit to have more understanding in general.
So, I tried using rsync to copy my macbook pro backup/clone from an external drive I have to another external drive. I ended up using...
"sudo rsync -a... (1 Reply)
Hio, So I have a crontab delete of older files setup. This script works fine if I run them by each individual directory.
Problem is there are so many thousands of files and hundreds of directories and sub directories that I need to recursively have it go through and delete files by directory... (2 Replies)
hello,
I'm trying to figure out which tool is best for recursively renaming and files or folders using the characters \/*?”<>| in their name. I've tried many examples that use Bash, Python and Perl, but I'm not much of a programmer I seem to have hit a roadblock.
Does anyone have any... (15 Replies)
hi all
I want a script that will use ftp to copy folder and sub folders from source server to current server. if i use -r switch then it just copies folders for 5 level. (1 Reply)
hi,
I've a folder structure like :
/home/project/LIBNAMEA/FILE1
/home/project/LIBNAMED/FILE2
/home/project/LIBNAMEC/FILE3
/home/project/LIBNAMED/FILE4
/home/project/LIBNAMEX/FILE5
(there is no relation in the letters after the project/ )
and i need to delete the files keeping... (5 Replies)
Hello Unix Gurus,
Help required from you.
My requirement is something like this
I want to create a concurrenct program in Oracle Applications using shell script to transfer files from Apps Server to destination FTP server.
I have created custom program, where I will extract all the... (4 Replies)
Hey everybody, this is my first post so be gentle. I have two Sun 5220's running Solaris 10 that are directly connected with a cross-over cable at Gig. One of these boxes is my production Oracle server which generates a 50GB dump file every evening at 10:50. The other Solaris is a devolopment... (8 Replies)
Hi everybody,
I just want to transfer files with FTP (mget and mput). The problem is that I dont want to overwrite any existing files and don't want to transfer them again (e.g. using the rename-function). So I only want to transfer new files with mget and mput.
My first idea was to create... (3 Replies)
Hello everyone,
we are running VSFtpd as FTP Server on Redhat AS 5. I would like to have a script to be run immediately after every FTP transfer. Is is possible (or with any other FTP Server?).
I thought of writing a script to monitor if FTP transfer happening and run the required-script... (2 Replies)
Hi,
I need to sync 2 remote folders so i setup with rsync which is working very fine. But, there comes another requirement to maintain multiple versions of files on destination (NOT to overwrite the destination file).
If there is difference between source file and destination file, it must... (2 Replies)