Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 51
  • Last Modified:

Copy jailed data SFTP Centos from one Linux server to another.

Hello to all the experts around here.

I need to be able to create a script which will be copying all the data from each user account's jail home folder (SFTPWRITE) on one Centos 7 server to antother Centos 7 server. Both of the Centos servers are using Chroot jail where each account logs in to his home folder (/home/user/SFTPWRITE) and cannot see any other users folders.

For example: the home folders for each account is /home/temp01/SFTPWRITE where temp01 is the user and the home folder and the SFTPWRITE is the area from which each account has a write permissions.

I have got the same users and passwords + chroot jail permissions set up on both servers but the only thing I need is to copy the SFTPWRITE data for each account to a different server. If that helps, I also have a txt file which includes username and password.

Any help will be highly appreciated.
0
Nitsan Reznik
Asked:
Nitsan Reznik
  • 3
  • 2
1 Solution
 
Duncan RoeSoftware DeveloperCommented:
If you have a file with user names and passwords(!) you could use expect and regular ftp, or you can use sftp if you prefer.
0
 
Nitsan ReznikIT Consultant Author Commented:
Hi,

Appreciate your response however, how can I use expect script in my example to achieve my goal?
0
 
Duncan RoeSoftware DeveloperCommented:
Expect is a Tcl extension. You have a list of accounts that you need to copy over. Processing that list is done in Tcl: expect does the mechanics of automating what would otherwise be a manual interactive command-line process.
I believe other scripting languages such as Perl have expect-like extensions to them. You may find this to be adequate if you have more expertise with one of these languages. Failing that, you may wish to conside hiring a consultant.
0
 
Nitsan ReznikIT Consultant Author Commented:
I ended up asking one of our DBAs and he has created for us a script using tar command.
0
 
Nitsan ReznikIT Consultant Author Commented:
No one else could have helped me
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now