copying the dir/subdir structure from one server to another?
Hi All,
I want to copy the dir/subdir structure from SERVER-A to SERVER-B without copying all the files in each dir.
Is it possible using SCP / SFTP command?
For example,
SERVER-A has following two dir/subdirectories and files under each subdir.
When I am done issuing this command, following dir/subdir structure should be on SERVER-B but no files should be copied.
SERVER-B
Moderator's Comments:
Please use next time code tags for your code and data
Hi all
Is it possible to copy a structure of a directory only.
e.g.
I have a file with the following entries that is a result of a find :-
/dir1/dir2/file.dbf
/dir1/dir2/dir3/file1.dbf
/dir1/file.dbf
I want to copy these to a directory and keep the structure however starting at a new dir... (8 Replies)
hi
i have a script
compareFiles()
{
find /tmp/Satya -type f | \
while read filename1
do
echo "----------------------------------------$filename1"
find /tmp/Satya -type f | \
while read filename2
do
if diff $filename1 $filename2
then
echo "Both files... (3 Replies)
hi:
I have some files like this
folder1/recording1.mp3
folder1/docs/budget.doc
folder2/others/misc.mp3
folder3/others/notes.doc
all this folders and files are under the mp3 folder.
I would like to move just the mp3s to another folder but retain the subdir structure i have.
So if... (4 Replies)
I have created a directory structure and under the directory subdirectories and files are there.I need to move the entire thing
to another path.How can i write a script to do that.
currently the path of files is as below :
/data1/serial/mcycle/archive : under this path differnt sub dir exist ... (6 Replies)
Hello, I have a directory www with multiple directories. Every directory has site name with .htm, .html, .php files or sub directories with .htm, .php, .html file as example
- www
- sitename 1
- site 1
- sitename 2
- sitename 3
What I'm looking for is a... (7 Replies)
Hey all,
i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file.
any help is appreciated...thank you in advance (1 Reply)
Hi,
I want to run git status for the dir which has subdir ".git" in it with dir path mentioned in output log?
If a dir does not have .git subdir then skip that dir.
Dir will have 100 main dirs & 500 + subdirs and so on.
I appreciate all your help :b: (4 Replies)
HI,
I need to move all files from a dir & its all subdir to Archive folder which is indise dir only. and moved filename should changed to complete path ( Like Dir_subdir_subdir2_.._filename ). also all files names shoud capture in a file in order to mail
I written below code ... (11 Replies)
I am trying to figure out a way to script copying specific files from one dir structure to another.
I have a dir structure like this:
dira/author 1/book 1/file a.epub
/book 2/file b.epub
/author 2/book 1/file c.epub
/author 3/book 1/file d.epub
/book 2/file... (2 Replies)
How do I create a tar file for only dir and its subdir structures?? (4 Replies)
Discussion started by: vx04
4 Replies
LEARN ABOUT CENTOS
create_server
CREATE SERVER(7) PostgreSQL 9.2.7 Documentation CREATE SERVER(7)NAME
CREATE_SERVER - define a new foreign server
SYNOPSIS
CREATE SERVER server_name [ TYPE 'server_type' ] [ VERSION 'server_version' ]
FOREIGN DATA WRAPPER fdw_name
[ OPTIONS ( option 'value' [, ... ] ) ]
DESCRIPTION
CREATE SERVER defines a new foreign server. The user who defines the server becomes its owner.
A foreign server typically encapsulates connection information that a foreign-data wrapper uses to access an external data resource.
Additional user-specific connection information may be specified by means of user mappings.
The server name must be unique within the database.
Creating a server requires USAGE privilege on the foreign-data wrapper being used.
PARAMETERS
server_name
The name of the foreign server to be created.
server_type
Optional server type.
server_version
Optional server version.
fdw_name
The name of the foreign-data wrapper that manages the server.
OPTIONS ( option 'value' [, ... ] )
This clause specifies the options for the server. The options typically define the connection details of the server, but the actual
names and values are dependent on the server's foreign-data wrapper.
NOTES
When using the dblink module (see dblink), the foreign server name can be used as an argument of the dblink_connect(3) function to indicate
the connection parameters. See also there for more examples. It is necessary to have the USAGE privilege on the foreign server to be able
to use it in this way.
EXAMPLES
Create a server foo that uses the built-in foreign-data wrapper default:
CREATE SERVER foo FOREIGN DATA WRAPPER "default";
Create a server myserver that uses the foreign-data wrapper pgsql:
CREATE SERVER myserver FOREIGN DATA WRAPPER pgsql OPTIONS (host 'foo', dbname 'foodb', port '5432');
COMPATIBILITY
CREATE SERVER conforms to ISO/IEC 9075-9 (SQL/MED).
SEE ALSO
ALTER SERVER (ALTER_SERVER(7)), DROP SERVER (DROP_SERVER(7)), CREATE FOREIGN DATA WRAPPER (CREATE_FOREIGN_DATA_WRAPPER(7)), CREATE USER
MAPPING (CREATE_USER_MAPPING(7))
PostgreSQL 9.2.7 2014-02-17 CREATE SERVER(7)