Category Archives: Hosting

Copy from folder to folder preserving everything

Either use

sudo cp -rp /home/folder /media/backup/folder

sudo cp -a /home/folder /media/backup/folder (UPDATE: use this one!!!preserves everything)

Or use:

 rsync -avz
-p     same as --preserve=mode,ownership,timestamps

 --preserve[=ATTR_LIST]
          preserve the specified attributes (default: mode,ownership,timestamps),
          if possible additional attributes: context, links, xattr, all

Source: https://unix.stackexchange.com/questions/43605/how-do-i-copy-a-folder-keeping-owners-and-permissions-intact

Dedicated/VPS test speed

Very nice find. You can check various speeds from your server with this little script.

I have checked it and it’s working just fine. Kudos to the developer.

https://www.lowendtalk.com/discussion/134290/new-year-special-serverreview-benchmark-v3

I have just tried it with little vps from hetzner:

[root@snapshot-5553580-centos-2gb-nbg1-1 ~]

# curl -LsO git.io/bench.sh; chmod +x bench.sh && ./bench.sh -a

Benchmark started on 06-Jul-2019 07:16:24

## System Information

OS Name : CentOS Linux release 7.6.1810 (Core) N (64 bit)
Kernel : KVM / 3.10.0-957.21.3.el7.x86_64
Hostname : snapshot-5553580-centos-2gb-nbg1-1
CPU Model : Intel Xeon Processor (Skylake, IBRS)
CPU Cores : 1 core @ 2099.998 MHz
CPU Cache : 16384 KB
Total RAM : 1790 MiB (Free 1533 MiB)
Total SWAP : SWAP not enabled
Total Space : 20GB (5% used)
Running for : 23 minutes 6 seconds

## CDN Speedtest

CacheFly : 136.55 MiB/s | 1092.39 Mbps | ping 3.415ms
CDN.net :ping: 993660212.r.worldcdn.net: Name or service not known
0 B/s | N/A | ping error!
Gdrive : 22.61 MiB/s | 180.86 Mbps | ping 3.335ms

## North America Speedtest

Softlayer, Washington, USA : 531.01 KiB/s | 4.15 Mbps | ping 88.651ms
SoftLayer, San Jose, USA : 771.82 KiB/s | 6.03 Mbps | ping 153.363ms
SoftLayer, Dallas, USA : 240.00 KiB/s | 1.88 Mbps | ping 119.020ms
Vultr, New Jersey, USA : 15.26 MiB/s | 122.10 Mbps | ping 80.797ms
Vultr, Seattle, USA : 7.06 MiB/s | 56.45 Mbps | ping 152.982ms
Vultr, Dallas, USA : 7.61 MiB/s | 60.91 Mbps | ping 123.992ms
Vultr, Los Angeles, USA : 5.95 MiB/s | 47.60 Mbps | ping 148.648ms
Ramnode, New York, USA : 4.22 MiB/s | 33.76 Mbps | ping 93.103ms
Ramnode, Atlanta, USA : 3.18 MiB/s | 25.44 Mbps | ping 109.802ms
OVH, Beauharnois, Canada : 1.23 MiB/s | 9.87 Mbps | ping 89.242ms

## Europe Speedtest

Vultr, London, UK : 70.07 MiB/s | 560.54 Mbps | ping 17.909ms
LeaseWeb, Frankfurt, Germany : 203.57 MiB/s | 1628.57 Mbps | ping 3.728ms
Hetzner, Germany : 121.62 MiB/s | 972.94 Mbps | ping 0.270ms
Ramnode, Alblasserdam, NL : 81.99 MiB/s | 655.92 Mbps | ping 10.764ms
Vultr, Amsterdam, NL : 115.90 MiB/s | 927.20 Mbps | ping 9.734ms
EDIS, Stockholm, Sweden : 2.44 KiB/s | 0.02 Mbps | ping 29.973ms
OVH, Roubaix, France : 101.74 MiB/s | 813.95 Mbps | ping 11.424ms
Online, France : 89.67 MiB/s | 717.36 Mbps | ping 12.747ms
Prometeus, Milan, Italy : 99.90 MiB/s | 799.21 Mbps | ping 15.812ms

## Exotic Speedtest

Sydney, Australia : 755.84 KiB/s | 5.91 Mbps | ping 307.885ms
Lagoon, New Caledonia : 1.13 MiB/s | 9.05 Mbps | ping 354.923ms
Hosteasy, Moldova : 26.20 MiB/s | 209.60 Mbps | ping 37.409ms
Prima, Argentina : 174.20 KiB/s | 1.36 Mbps | ping error!

## Asia Speedtest

SoftLayer, Singapore : 645.17 KiB/s | 5.04 Mbps | ping 179.195ms
Linode, Tokyo, Japan : 2.61 MiB/s | 20.89 Mbps | ping 268.694ms
Linode, Singapore : 5.90 MiB/s | 47.22 Mbps | ping 211.743ms
Vultr, Tokyo, Japan : 2.51 MiB/s | 20.08 Mbps | ping 251.989ms

## IO Test

CPU Speed:
bzip2 512MB – 83.2 MB/s
sha256 512MB – 261 MB/s
md5sum 512MB – 330 MB/s

Disk Speed (512MB):
I/O Speed – 495 MB/s
I/O Direct – 63.4 MB/s

RAM Speed (895MB):
Avg. write – 1654.5 MB/s
Avg. read – 4949.3 MB/s

Benchmark finished in 129 seconds
results saved on /root/bench.log

[root@snapshot-5553580-centos-2gb-nbg1-1 ~]

#

DirectAdmin skin upgrade/downgrade

I have installed new vps with directadmin control panel. Tried to log in and got myself into new skin. I do like it but I’m old kinda type of programmers…I like it to be simple. All those ajax calls I don’t actually like.

To cut the long story short…go to resellers…skin manager…and then setup global skin and apply to all.

DirectAdmin transfer

I have just transferred directadmin server to server. It was, well, easy I would say. If you know what you are doing then it is.

Server had CSF installed as well.

First use DA admin backup on server A, transfer via ssh to server B, then use restore on server B from DA admin/restore backup. Use new IP address from the dropdown list. Backup CSF and transfer it to the next server (follow the path when backing up…correct folder).

Next, on the server A revoke Let’s encrypt for domain name server (IP you have used for nameserver): https://help.directadmin.com/item.php?id=2084
Then install Let’s encrypt: https://help.directadmin.com/item.php?id=648
Then this: https://help.directadmin.com/item.php?id=629

Then install CSF from here https://help.directadmin.com/item.php?id=527. Use option 3. Restore previously CSF backup.

Next, install custombuild plugin.

Next, I like to use this tool for installing PECL extensions.
https://help.poralix.com/articles/install-pecl-extension-for-php-directadmin-server

Next, enable forced SSL for each domain.

DirectAdmin changing nameserver and redirecting to new domain name instead of IP

I had a problem. I needed to change domain name of the server – aka nameserver. It was already using some other name so the problem is there. After changing nameserver it didn’t work. It was redirecting me back to the old nameserver.

Solution:

  1. https://help.directadmin.com/item.php?id=405
  2. You need to update let’s encrypt with the new nameserver ( https://help.directadmin.com/item.php?id=629 )
  3. https://www.directadmin.com/features.php?id=801
  4. Mass update dns for all domains – https://help.directadmin.com/item.php?id=141

That’s it.

DirectAdmin webalizer problem – solved

I have just had an error when trying to reinstall webalizer in DirectAdmin.

Libgd error was echoing. So I was looking for reproduce problem and found a solution.

https://fedoraproject.org/wiki/EPEL // install repo for gd-devel

yum install gd-devel // install gd

./build webalizer

###### and voila
rm -f /usr/bin/webazolver
ln -s webalizer /usr/bin/webazolver
/usr/bin/install -c -m 644 webalizer.1 /man/man1/webalizer.1
/usr/bin/install -c -m 644 wcmgr.1 /man/man1/wcmgr.1
rm -f /man/man1/webazolver.1
ln -s webalizer.1 /man/man1/webazolver.1
/usr/bin/install -c -m 644 sample.conf /usr/etc/webalizer.conf.sample
[root@online custombuild]# webalizer
Webalizer V2.23-08 (Linux 3.10.0-862.14.4.el7.x86_64 x86_64) English
Using logfile STDIN (clf)
Creating output in current directory

That’s it.

OVH.IE no VAT validation

ovh.ie

If you have ordered services from ovh.ie and you are not living in an EU country do this to avoid unnecessary vat tax.

http://forum.ovh.co.uk/showthread.php?8469-VAT-Removal-Account-Validation-queries-for-OVH-IE-customers-only