• Home
  • WP tuts
  • Hosting talk
    • Free hosting
    • Cheap Hosting
    • comparison cloud , vps, shared, wordpress
    • managed wordpress hosting
    • managed cloud hosting
  • Speed up wordpress
  • Pc world
  • Services
  • About Me

RAaz Kumar .com

wordpress tutorials seo hosting etc

3 Ways (SCP, rsync, Sftp) linux server migration between two remote server apache nginx

1#Backup using mysqldump & zip SFTP client.

export mysqldump
zip www directory & server config files
download to local computer
install new latest version of Softwares LAMP or LEMP
upload
& configuration files & Data
assign users from root to server user.
remote transfer between two linux servers ,rsync

#2 SCP: copying files & directories one sever to another server remote

scp command
secure copy,
scp source user@destinationip pathtosave
scp /var/www/bak.zip root@192.168.0.1 /var/www/
or just delete the html directory in new server
scp -r /var/www/html root@192.168.0.1 /var/www/html
3rd or copying only internal file of html
scp -r /var/www/html/* root@192.168.0.1 /var/www/html
asks for password enter root password.

# 1. Enable roor login in Linxu serer

incase ssh disabled root login.  enable root login
in sshd.config file
and
restart sshd.

enable disable password login

nano /etc/ssh/sshd_config
take backup cp
passwordauthentication yes/no
#comment
allow root password login yes/no
#comment
service ssh restart
2nd way
ssh-copy-id command
ssh-copy-id user@remoteip
enter password.
next time
ssh user@remoteip
login successful
no manual copying
for one-time use its better to use ssh password
once the file copied you can disable root login.
to avoid brute force attacks
or pairing ssh keys between two remote severs
public key source machine
private key in target machine
type scp to know manual page(command options)
scp -p22 /,pathtopublickey

#3 Rsync (remote sync data to local & remote to remote)

data between two servers syncs.
set a chrome job to backup daily/weekly.
apt install rsync
syncing data (1st time) to backup directory
rsync datadirectory/* /backupdir
rsync -r /var/www/html/ /etc/home/backup/
-r recursively subfolder & files
-a with users & file permissions attributes .files /hidden files
-av
 v verbose output
rsync root@remoteip:- /path/tosave /currentserverpath

File Transfer rsync /scp

Rsync web root Directory

rsync -avz –progress 111.222.333.444:/var/www/site1 /var/www/

Rsync the apache conf

rsync -avz –progress 111.222.333.444:/etc/apache2/* /etc/apache2/

Rsync php config file

rsync -avz –progress 111.222.333.444:/etc/php5/* /etc/php5/

Rsync mysql conf

rsync -avz –progress 111.222.333.444:/etc/mysql/* /etc/mysql/
remote file deleted /  source file deleted both will lost.
if new file added both gets new.
ssh root@111.222.333.444 ‘mysqldump -a -u root -ppassword > /root/alldb.sql’
-A dump all databases.
syncing to current server
rsync -avz –progress 111.222.333.444:/root/alldb.sql /root/
import
mysql -u root -ppassword < /root/alldb.sql
rsync is the best Backup solution on server for daily/weekly/monthly routines

#1.1 pairing two servers with ssh (Optional)

with password
ssh user@remoteip
enter password
you done..
(but every time password entry, vulnerable to others.)

generating ssh keys

note: if you already have public in local desktop,
just copy another remote server, private key already at destination server.
or follow this
generating ssh key
ssh-keygen rsa -a -b 2048
cd ./ssh
ls -la
copying public key to remote machine
scp (if root password login enabled or download & upload)
scp rsa.pub user@remotep: /pathtolocation

enter password

add public key to
./ssh/authorizedkeys
cat command (appends to end of the file)
file permissions
ssh folder 700
ssh files 600
chmod 700 ./ssh
chmod 600 ./ssh/*
Os kernel version & architecture
uname -r && uname -m
5.2.0-24-virtual
//Kernel version
Os architecture
X86_64 64bit
I686 32
distribution /os version
cat /etc/issue or lsab-release
Ubuntu 12.04.2 LTS \n \l
transfer ssh keys between two servers
transferring core data
/etc/sources/apt/list.deb
file & directories & MySQL dump
preparation
to check which services are running
service –status-all
connecting 2 servers ssh keys
cloning operating system to another disk
(windows desktop we use minitool,)
Migrating users & group
clone running linux server
another way.
cloning is to disk.
also read Linux performance tuning

Related topics:

  1. wordpress password reset in 3 ways mail, phpmyadmin, mysql command
  2. mysql workbench tutorials (Sql Development , modelling, server admin export & import)
  3. install wordpress via command line apache nginx ubuntu debian
  4. Linux sysadmin tutorials linux system administrator
  5. RaazKumar.com #hosting #wordpress #linux #nginx #apache

tutorials

  • Android Studio tutorials syllabus Topics Course details #AndroidApplicationDevelopment
  • xampp tutorials 2021 installation errors fix wordpress phpmyadmin mysql apache
  • Devops Syllabus topics PDF
  • CCNA Syllabus pdf (CCNA / CCNP vs devops vs mcsa /MCSE)
  • how to create a website free of cost on google
  • what is vpn vs proxy vs tor, http vs https, http2, tcp vs udp, kali linux sql source code injection
  • nginx server tutorials (installation, configuration, performance tuning, security)
  • Vivek Bindra Videos Transcription (business strategy)
  • AUdio Editing Background Noise removal (Audacity, Adobe Premiere Addition, Camtasia Filmora Windows Obs)
  • MySQL Tutorial (create,connect database, update tables, export etc) Documentation & TIPS
  • [INTRO] Ethical hacking / cyber Security / Penetration testing Tutorial -{updates frequently}
  • ubuntu tutorials installation download issues etc
  • Php tutorials
  • HTML & CSS Tutorials
  • Core Java Tutorial Free online
  • Linux sysadmin tutorials linux system administrator
    • top 10 apt & apt-get commands (most used) apt vs apt-get
    • linux commands pdf (files & Directories, zip & unzip process, search etc)
    • linux performance tuning inode limit file descriptors tco, kernel etc
    • Top 10 most used Cat commands with examples (create, view, append files)
    • Ip tables / ufw / firewall d commands for block port ip rate limiting
    • Top 10 zip / tar commands to compress & extract files in linux
    • TOP 10 mv & cp commands in linux to move & copy files in Linux
    • Top 10 GREP Commands in linux to search files
    • lsof netstat commands to know listening ports in linux 3 ways
    • Upgrade Ubuntu from 18.04 (19.10) to 20.04 LTS command line or gui server | desktop
    • 3 Ways (SCP, rsync, Sftp) linux server migration between two remote server apache nginx
    • linux system specs commands (CPU, Memory, Disk )speed, type. manufacture
    • linux sysctl.conf performance tweaks net.core.somaxconn nginx kernel settings
  • apache server tutorial (install,config, performance tuning, security, error handling)

 

PUBG Mobile Tips & Tricks

free fire how to play (a-z guide) guns, tips &#038; tricks etc

Windows 10 tips & tricks

Pagespeed optimization

Pc building tips & tricks

nginx server tutorials

apache server tutorials

linux sysadmin tutorials

mysql Commands list pdf

Android studio tutorials

Gaming/ streaming tips

Airtel dth channel list

 

wordpress

 

Top 5  WP Google Analytics Plugins

WP Backup Plugins

Wp Comment Plugins

Top wordpress Security Plugins

WP Seo Plugins

WP Caching Plugins

Best Adsense Plugins for WordPress

Wp social Sharing Plugins

autoshare social media plugins

WP speed Optimization Plugins

Speedup WordPress google Score

More Wp tuts

Server Admin Cloud

 

Installing Nginx LEMP On ubuntu

Installing apache Lamp ubuntu

nginx fastcgi cache enable

php – fpm install  & Configuration

Opcache install & Configure

php -fpm pool manager explained

Mysql Install & Configuration

Redis Object cache install & configure

 

Nginx as Reverse Proxy and Load balancer

Load Balance / auto scaling in google cloud

Linux Commands PDF

Mysql Commands Pdf

Letsencrypt tutorial

mysqldump export & import 

Pagespeed Module install & configure

nginx.conf best file

mysql.conf best file

upgrade ubuntu

© 2021 - All Rights Reserved Disclaimer & Privacy Policy