12-07-2019
File Management: Removing of files from Server2 IF the same file is removed from Server1.
Hi Folks,
I have a requirement of file management on different servers.
Source Server is SERVER-A.
Two servers will fetch files from SERVER-A: SERVER1 and SERVER2.
4th SERVER is SERVER-B, It will fetch files from SERVER1. If SERVER1 goes DOWN, SERVER-B will fetch pending files from SERVER2(no duplicity).
Suppose, Server1 has 4 files file1/2/3/4 (It fetched it from SERVER-A) and SERVER2 also 4 files file1/2/3/4(it also fetched it from SERVER-A). There is no SYNC between SERVER1 and 2.
Now SERVER-B will fetch file1/2 from SERVER1 and it will delete same. So SERVER1 has now file3/4. SERVER1 goes down.
So SERVER-B will start picking file from SERVER2(SERVERB will be manually pointed to SERVER2), but it should only pick file3/4 as file1/2 were already picked.
I need a mechanism by using which - If SERVER-B deletes a file from SERVER1, then it also get deleted from SERVER2 - NOTE SERVER-B is not capable to do this, so this has to be done from SERVER1 end. If file1/2 is removed from SERVER1, then it should delete it from SERVER2.
Please let me know if more clarification is required.
I think, RSYNC is one of the way, but requirement is limited.
Thanks to all in advance.
Raza Ali
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Please help. Here is my problem. I have 9000 lines in file a and 500,000 lines in file b. For each line in file a I need to search file b and remove that line. I am currently using the grep -v command and loading the output into a new file. However, because of the size of file b this takes an... (4 Replies)
Discussion started by: mjs3221
4 Replies
2. Shell Programming and Scripting
Hi ,
i have three server
server1 -> Unix OS ,ftp enable IP ->10.8.219.190
server 2 -> Unix OS ,ftp enable
NIC 1 IP ->10.8.219.191 ,NIC2 ->192.168.0.5
server3 -> windows OS ,ftp enable NIC1 ->192.168.0.6.
hence server 1 and server 3 can not communicate ,but server 2 can... (1 Reply)
Discussion started by: suchintkotia
1 Replies
3. UNIX for Dummies Questions & Answers
Hello
i have the files in this format
pdb1i0t.ent
pdb1lv7.ent
pdb1pp6.ent
pdb1tj2.ent
pdb1xg2.ent
pdb2b4b.ent
pdb2ewe.ent
Now i have to remove the prefix pdb from all the files and also i need to change the extension of .ent to .txt
The new file should look like this
... (3 Replies)
Discussion started by: empyrean
3 Replies
4. Shell Programming and Scripting
hi
is there any way to append the file contents at server1 to another file in server2 by using scp.
right now am transferring files to the server2 and using cat command for appending... (2 Replies)
Discussion started by: aemunathan
2 Replies
5. Shell Programming and Scripting
Hi All,
I have some 50,000 HTML files in a directory. The problem is; some HTML files are duplicate versions that is wget crawled them two times and gave them file names by appending 1, 2, 3 etc after each crawl. For example, if the file index.html has been crawled several times, it has been... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
6. Linux
Hi Team,
I have deleted a file accidentally by using rm command. I am not the root(admin) user. Can you please let me know how to get that .tex file? (2 Replies)
Discussion started by: darling
2 Replies
7. Shell Programming and Scripting
hi,
i have two servers in unix. say server1 and server2. my shell script is running on server1.
In server2, there is a directory (/etc/data/) which contains some text files.
I want to write the list of filenames in server2 in a file and display the file in server1.
In short, i want to... (3 Replies)
Discussion started by: Little
3 Replies
8. UNIX for Dummies Questions & Answers
Hi ALL,
Requirement:Connect server2 from server1 and get the list of files generate on currentdate .
Basically i need to check the files in server1 and server2 on currrent date is equal on each 1 hr frequency.
Can anyone help me on this.
Thanks in advance
Hari (2 Replies)
Discussion started by: psthariharan
2 Replies
9. Shell Programming and Scripting
Below is a flowchart of a program. Most everything works as expected, but there are a couple of issues that I need some expert help on. The check function was setup initially for a single user input. The input has been modified to allow for multiple inputs, so the code below does not work. My... (15 Replies)
Discussion started by: cmccabe
15 Replies
10. Shell Programming and Scripting
Hi All,
Is there is any machanisim, once delete the file can we restore it.
Thanks (8 Replies)
Discussion started by: bmk123
8 Replies
LEARN ABOUT DEBIAN
fusesmb.conf
FUSESMB.CONF(5) File Formats Manual FUSESMB.CONF(5)
NAME
fusesmb.conf - the configuration file for fusesmb
FILE FORMAT
The file consists of sections and parameters. A section begins with the name of the section in square brackets and continues until the next
section begins. Sections contain parameters of the form: name = value.
The file is line-based - that is, each newline-terminated line represents either a comment, a section name or a parameter.
Section and parameter names are not case sensitive.
Only the first equals sign in a parameter is significant. Whitespace before or after the first equals sign is discarded. Leading, trailing
and internal whitespace in section and parameter names is irrelevant. Leading and trailing whitespace in a parameter value is discarded.
Internal whitespace within a parameter value is retained verbatim.
Any line beginning with a semicolon (``;'') or a hash (``#'') character is ignored, as are lines containing only whitespace.
SPECIAL SECTIONS
fusesmb.conf can contain the following sections:
The [global] section
Section for global parameters.
The [ignore] section
Section for specifying servers and/or workgroups that should not be listed.
The [/SERVER] section
Section for server-specific settings. The section name should start with a slash ``/'' and not end with a slash.
The [/SERVER/SHARE]
Section for share-specific settings. The section name should start with a slash followed by the server name followed by a slash end-
ing on the share name. It should not end with a slash.
EXPLANATION OF EACH PARAMETER
This chapter explains each possible option. The section names - specified between parentheses after each option - shows the applicable sec-
tions for this option. For example: ( [global] ) specifies that this option is only possible for the section [global].
ignore ( [/SERVER] )
Ignore this server. Possible values are: true, false, 1 and 0.
Example: ignore = true
interval ( [global] )
Interval for scanning the network for shares. Value is a number that specifies the network scanning interval in minutes. If the
value is smaller or equal to zero the network is not scanned.
Example: interval = 20
password ( [global], [/SERVER], [/SERVER/SHARE] )
Password. Value is string containing the password.
Example: password = secret
servers ( [ignore] )
Servers to ignore. Value is each server to ignore separated by a comma.
Example: servers = SERVER1, SERVER2, SERVER3
showhiddenshares ( [global], [/SERVER] )
Show hidden shares. Possible values are: true, false, 1 and 0.
Example: showhiddenshares = false
timeout ( [global] )
Connection timeout in seconds. A server after this timeout is considered offline. Values smaller than 2 seconds are ignored.
Example: timeout = 10
username ( [global], [/SERVER], [/SERVER/SHARE] )
Username. Value is string containing the username.
Example: username = johndoe
workgroups ( [ignore] )
Workgroups to ignore. Value is each workgroup to ignore separated by a comma.
Example: workgroups = WORKGROUP1, WORKGROUP2
EXAMPLE
; Global settings
[global]
; Default username and password
username=user
password=totallysecret
; List hidden shares
showhiddenshares=true
; Connection timeout in seconds
timeout = 10
;Interval for updating new shares in minutes
interval = 10
; Section for servers and/or workgroups to ignore
[ignore]
servers=SERVER,SERVER2,SERVER3
workgroups=WORKGROUP,WG2
; Share-specific settings
[/SERVER/SHARE]
username=john
password=doe
; Server-specific settings
[/SERVER]
username=jane
password=doe
showhiddenshares=true
ignore=true
SEE ALSO
fusesmb(1)
AUTHOR
Vincent Wagelaar <vincent@ricardis.tudelft.nl>.
August 5, 2005 FUSESMB.CONF(5)