Sponsored Content
Top Forums Shell Programming and Scripting Transfer files from one server with bash script Post 302966498 by Aia on Friday 12th of February 2016 07:16:57 PM
Old 02-12-2016
Quote:
Originally Posted by Ophiuchus
Hi Aia,

Sorry my lateness in response. I had issues with connection.

Source Server: is the server where the files I want to copy reside
Destination Server: is the server where I try to send the command to transfer the files from Source Server to Destination Server.

So, I'm trying to send the command you suggest in the way below in Destination Server but I get the errors below:. What I'm doing wrong?

Thanks for the help.

Code:
 find /path/ -mtime -1 -type f -printf %P\\0 | rsync -azv --dry-run --remove-source-files --files-from=- -0  /path/ -e ssh root@192.168.100.20:/destination/
 
 find: ‘/path/': No such file or directory
root@1192.168.100.20's password:
building file list ...
rsync: change_dir "/path/" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at flist.c(2118) [sender=3.1.1]

/path/ was intended as an example; you have to substitute it for your own directory, the one you want to search from. Same goes with /destination/, you have to substitute for the destination directory you want.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Transfer files from Unix server to Windows using FTP

Dear Friend, I don't know much about unix.I am an VB6.0 Programmer.I need to move an text files as aaa.txt from unix server to windows "D: " driver using the FTP protocol.Is it possible to do this with help of unix shell script.If possible please give some sample codes. Please answer as early... (1 Reply)
Discussion started by: gjsaravanan
1 Replies

2. Linux

transfer files from the server 1 to server 2

I want to transfer files from the server 1 to server 2, but only information available FTP my server 2 How? Is there a script help me in the transfer of files through FTP :( (2 Replies)
Discussion started by: bomozah
2 Replies

3. Shell Programming and Scripting

Shell script to transfer the files from source to target server.

I need to write a shell script to transfer the files every hour from source - target server. The cron job should be running every hour and shouldn't copy already copied files to the remote server ? I was able to write intial script but not able to get the logic for (in the next run it should... (12 Replies)
Discussion started by: radhirk
12 Replies

4. Shell Programming and Scripting

SFTP to transfer files from one server to another

Hello, i have to write a script to perform sftp from the remote server to another server. the files which are at the remote location are huge data log files which should be transfered to my server in a particular folder. could you please provide me the general code (simple )... (1 Reply)
Discussion started by: urfrnddpk
1 Replies

5. UNIX for Dummies Questions & Answers

Transfer file from server B to server C and running the script on server A

I have 3 servers A, B, C and server B is having some files in /u01/soa/ directory, these files i want to copy to server C, and i want to run the script from server A. Script(Server A) --> Files at Server B (Source server) --> Copy the files to Server C(Target Server). We dont have RSA key... (4 Replies)
Discussion started by: kiran_j
4 Replies

6. Shell Programming and Scripting

Help with script to transfer files from one server to another

Hi I have the following script: #!/bin/sh set -x touch -mt 201210040000 /tmp/ref1 touch -mt 201210042359 /tmp/ref2 find /fs1/bscsrtx/BSCS_ix/WORK/LOG -type f \( -newer /tmp/ref1 -a ! -newer /tmp/ref2 \) > file_lst scp $(< file_lst) root@10.100.48.76:/ano2005/fs1_2015/LOG/ but somehow its... (7 Replies)
Discussion started by: fretagi
7 Replies

7. Shell Programming and Scripting

Do I require remote login access to a windows server to transfer files from a UNIX server

Hi All I need to transfer a file from a UNIX server to a windows server. I saw that it is possible to do this using scp command by looking at the forum listed below: ... (2 Replies)
Discussion started by: vx04
2 Replies

8. Shell Programming and Scripting

Shell scripting to transfer files from one to another server through ftps

Hi Guyz ,, I'm an ERP functional guy , I really need to automate a script which required a shell script but have a little knowledge in shell scripting. I need my generated files to be zipped first in one directory lets say (xyz) and then it needs to transfer another ftp server in... (3 Replies)
Discussion started by: Shogundion
3 Replies

9. Shell Programming and Scripting

Making bash script allways executable when transfer ?

Does it possible to make some bash script automatic to be a executable when transfered to another pc...? (5 Replies)
Discussion started by: tomislav91
5 Replies

10. UNIX for Beginners Questions & Answers

Not able to transfer files using between server A and B

Hi All, I have generated public and private pair to avoid to enter password manually while sending files through sftp. But still I am facing issues and every-time prompt asking enter password. Below are steps I fallowed to make ssh connection between two servers. 1. Generated public and... (5 Replies)
Discussion started by: renukeswar
5 Replies
asupgrade(1m)						    Application Server Utility						     asupgrade(1m)

NAME
asupgrade - migrates the configuration of a previously installed Sun Java System Application Server SYNOPSIS
asupgrade [-c | --console] [-V --version] [-h | --help]-s | -source applicationserver7.x_installation -t --target application- server8.x_installation [-d | --domain domain_name -n | --nsspwdfile NSS_password_filepath -j | --jkspwdfile JKS_password_filepath -p | --capwdfile CA_password_filepath] Use the asupgrade utility to migrate the server configration and its persisted state, J2EE services, and deployed J2EE applications. The configuration of an installed Sun Java System Application Server 7 is migrated to the Sun Java System Application Server 8 Application Server installation. If the domain contains information about a deployed application and the installed application components do not agree with the configuration information, the configuration is migrated as is without any attempt to reconfigure the incorrect configurations. asupgrade migrates the configuration and deployed applications of a previous version of the Application Server; however, the runtime bina- ries of the server are not updated. Database migrations or conversions are beyond the scope of the asupgrade command. Only those instances that do not use the Sun Java System Web Server specific features will be upgraded seamlessly. Configration files related to HTTP path, CGI bin, SHTML, and NSAPI plugins will not be upgraded. The upgrade process can also be initiated automatically at installation time using the Upgrade checkbox in the Application Server install- er. After completion of the upgrade, use the Application Server 7 Uninstaller to remove the previous version of the Application Server. Application archives (.ear) and component archives (.jar, .war, .rar) that are deployed in the Application Server 7 environment do not require any modification to run on Application Server 8. However applications and components deployed in the source server are repackaged into new J2EE archives in the target server's autodeploy directory and are deployed upon server startup. Applications that do not deploy successfully, must use Migrationtool (asmigrate) on the application and then manually redeploy the application. You must specify the source and target directories for the upgrade. If the upgrade includes certificates, you must also provide the pass- words for the source PKCS12 file and the target JKS keyfile for each domain that contains certificates to be migrated. Since Application Server 7 uses a different certificate store format (NSS) than Application Server 8 (JSSE), the migration keys and certificates are con- verted to the new format. Upon successful upgrade, an upgrate report is generated listing successfully migrated items along with a list of the items that could not be migrated. OPTIONS
-c --console launches the upgrade command line utility. -V--version displays the version of the UpgradeTool. -h--help displays the arguments for launching the UpgradeTool. -s--source identifies the installation directory for Sun Java System Application Server 7. -t--target identifies the installation directory for Sun Java System Application Server 8. -d--domain identifies the destination domain name for the migrated certificates. -n--nsspwdfile identifies the path to the NSS password file. -j--jkspwdfile identifies the path to the JKS password file. -p--capwdfile identifies the path to the CA certificate password file. EXAMPLES
Example 1: Using asupgrade example% upgrade -s /home/sunas7 -t /home/sunas8 SEE ALSO
asmigrate(1M) Sun Java System Application Server March 2004 asupgrade(1m)
All times are GMT -4. The time now is 07:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy