Trying to limit a staging server to a specific set of IP's that can access it. How would I do this for iptables or is there a better way to do it?
Daniel Fischer's questions
How do you restart nginx on a Ubuntu passenger-nginx install?
I installed passenger, and then it automatically installed nginx. However there's no command to restart nginx anywhere. I tried service restart nginx and /etc/init.d/nginx restart and no luck.
I'm trying to do something with a Capistrano task that is similar to the heroku db:pull
functionality if you are familiar with it.
I have a remote server. On that server I have a bunch of backups in the /path/db_backups/
folder. And in that folder there's a backup of the database everyday.
All I want to do is
- Download the latest backup on the client machine in /path/to/backups_dir/
- Untar it locally.
- Import it into local mysql db.
Anyone know of a good way to handle this? Is there a gem I am unaware of? Is there a script you have handy?
If I have a server that is running Nginx + Passenger (mod_rails) how would I figure out how many requests a second are coming in?
I installed postgresql via Homebrew.
I have the following issue after upgrading:
FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 9.0, which is not compatible with this version 9.1.2.
Any tips on how to upgrade? I tried the following:
$ pg_upgrade -d /usr/local/var/postgres/ -D /usr/local/var/postgres -b
/usr/local/Cellar/postgresql/9.0.4/bin -B /usr/local/Cellar/postgresql/9.1.2/bin
It didn't work. Here's the output.
Performing Consistency Checks
Checking current, bin, and data directories ok
Checking cluster versions
This utility can only upgrade to PostgreSQL version 9.1.
Failure, exiting
error.
When I run a couple scripts from the vBulletin software (like uninstalling a plugin) it takes forever.
When monitoring the memory usage, it shows this =>
-/+ buffers/cache: 158 381 Swap: 255 10 245
It seems that MySQL is only using a certain amount and once it does it tries to use the swap instead?
I have a 512MB slice and right now my key buffer is at 16M and max_allowed_packet is at 16M.
Is there something else I should increase or can I increase those variables and still be safe?
Thanks.
When I type ab -c 2 -n 100 (myurl.com)
and have top up... my cpus on apache average 10% an average of 15-20% load on top
My requests per a second is pretty low... or is it?
Requests per second: 3.47 [#/sec] (mean)
How should I go about optimizing this....?
Linode VPS 512MB ram Apache/Php5/Apc
Take a look at this:
http://img.skitch.com/20100214-pf95t9dpywxqgne7wrk65nnhq5.png
After taking a look at that would you be able to say I need to optimize or am I doing ok?
I do a mysqldump manually every night.
I just noticed that after it is done and I try to access the website it is very slow. After I take a look at the free -mh I notice that the server is now swapping when it otherwise wasn't before the mysqldump.
What am I to do in this case? Just restart the server every time I backup? That doesn't seem very effective.
My database file raw is 1.1gb after the dump.
I have a php/vbulletin/apache server running a 360 instance of linode.
I am wondering what is the best way to remote backup the server in another location?
I'm guessing I have two options, FTP and Amazon S3.
Can anyone provide some example hosts and pricing? Your experience with them perhaps?
I don't want to spend too much money on this... I just want to be able to restore the DB at the least in case something is lost.
The MySQL database is 800mb – what I'm not understanding is the total amount of space I need for the backup. If I backup daily for a week it would be 800x7 but then I get confused when a few people told me about "incremental backups"?
What about a script or is it just plain ol' rsync?
Anyway, any advice would be greatly appreciated.