how to disable redis rdb persistence in redis5.0 - redis

I have tried the search result, like modify redis.conf, change the appendonly to no,
comment save 900 1 etc, add save "" .but still not work, how to do?

Related

monit check file for removed content

I'm trying to check some config, which should contain combination: "^UseBridges".
And i know, that file can be changed after somewhat editing via admin UI, but UI doesn't support feature i need.
So i'm trying to write monit check for it, so it will check config, and if confeg resetted, it will add some needed strings to the end of config.
I've tried next rules:
check file torrc with path "/root/t" if content != '^UseBridges' then alert
and
check file torrc with path "/root/t" if not match '^UseBridges' then alert
Both syntaxes looks correct, but doesn't work the way i expect.
If i remove "!" or "not" - it works as expected. It finds string and execute action.
But if i want to check that removal of string - nothing happens.
What is wrong?
Or monit doesn't support that?
The Monit does not support that.
But if i want to check that removal of string - nothing happens.
What is wrong? Or monit doesn't support that?
Monit read the content of the file and keep the position of the last line in mind. With the next cycle additional lines are read etc.. If the file size became smaller, Monit start reading from the beginning.
Monit can not find deleted lines, because Monit does not compare file, Monit check the occurrence of a string only.

Unison: sync only in one direction ...option selected in profile

I'm effectively asking this question:
Unison: sync only in one direction
but I'd like to apply the accepted answer to a profile script. Can I do that?
unison /src/dir /dest/dir -force /src/dir -nodeletion /dest/dir
Cheers!
Yes, of course you can write that command line to the profile script.
Locate the corresponding .prf unison preferences/profile file (usually under $HOME/.unison, but please double check, this may vary depending on your OS or Unison installation)
Edit the .prf file and add the following:
# Unison preferences
label = Sync in only one direction (mirror)
root = /src/dir
root = /dest/dir
force = /src/dir # force changes from this replica to the other
nodeletion = /dest/dir # prevent file deletions on this replica
noupdate = /src/dir # prevent file updates on this replica
You can also replace step #1 above by creating a new preferences profile using the Profile Editor in the GUI, or your text editor of choice. Please remember the name and location of this file (e.g. $HOME/.unison/sync-one-direction.prf). Then you can call unison from the command line like this:
unison $HOME/.unison/sync-one-direction.prf
or
unison -i
The latter will start an interactive profile selection.
HTH

Changing a read only: /proc/sys/vm/max_map_count

I am trying to change my /proc/sys/vm/max_map_count file in order to increase the number of processes.
Is there a workaround to edit this read only file?
It's a dirty hack.
Instead, you can add a row:
vm.max_map_count=...your_count...
to the /etc/sysctl.conf

Using intellij idea merge as default merge tool in hg

So, i've found this page here, showing how to use intellij's idea merge and diff from command line, and i'm trying to set it as a default for hg.
However, i still have some problems when merging branches (many files):
If hg merge is called while there's no idea instance running, it starts a new instance, show the diff, wait for my response (click on apply / abort). After that, it proceeds to the next file, and do the same. File by file. Works pretty well, but is also veery slow (since it needs to start a new instance every time). Also, as said, there must be no idea instance running, to do that.
If hg merge is called while an idea instance is running, it shows the first diff window, but at the same time starts to merge all other files... This end up in a lot of pop-ups of "file not found" on idea, pointing to tmp files (of .other and .original).
Does anybody know how to do that in a usable way? hg merge using idea merge as default ?
Here's my .hgrc file: [ui]
merge=idea
[merge-tools]
idea =
idea.gui = True
idea.args = merge $local $base $other $output
idea.priority = 1000
idea.premerge = False
Sorry for the bad english, and thanks to all in advance
Hi here are the settings I used successfully.
[ui]
merge=idea
[merge-tools]
idea.args = merge $local $other $base $output
Also ensure that idea is on the path.
My references are the mercurial MergeToolConfiguration and Merging files using IntelliJ IDEA as a command line tool.
Idea does not wait, but gives return too early. A good way to solve this problem is to get mercurial to prompt you.
By setting this configuration in the .hgrc
idea.check = prompt
Mercurial will ask for confirmation on each file. You must finish the merge in Idea before clicking "Yes" on the confirmation box.

How to ignore failure when file does exist when downloading with WinSCP script

Running a script to get a file from SFTP server, however this is recurring job and should still succeed if no file exist, is there an option I can specify?
option batch on
option confirm off
option transfer binary
open sftp://server -timeout=60
password
get /File/2_04-28-2015.txt D:\Files
close
exit
Getting this result:
Can't get attributes of file 'File/2_04-28-2015.txt'.
No such file or directory.
Error code: 2
Tried setting failonnomatch:
winscp> option failonnomatch on
Unknown option 'failonnomatch'.
You cannot tell WinSCP to ignore absent file, when using a specific file name.
But you can check the file existence prior to the actual download.
Easy alternative hack is to use a file mask (note the trailing *) and set the failonnomatch off:
option failonnomatch off
get /File/2_04-28-2015.txt* D:\Files\
(if you are getting "Unknown option 'failonnomatch'", then you have an old version of WinSCP).
Have you tried using MGET instead of GET? It shouldn't fail, just not transfer anything if there's nothing there.