backup

How to backing up database by its table and restore them to new database

Submitted by admin on Thu, 02/15/2018 - 12:30

for creating separated files for each table:

for x in `mysql --skip-column-names -u <source_username> -p<source_password> <source_database_name> -e 'show tables;'`;
do
     echo "file=$x"
     mysqldump -u <source_username> -p<source_password> <source_database_name> $x > "$x.sql"
done

 

for restoring all .sql files that we have been created in the previous step to our new database

How To Use Rsync to Sync Local and Remote Directories on a VPS

Submitted by admin on Thu, 09/29/2016 - 14:10

Introduction

Rsync, which stands for "remote sync", is a remote and local file synchronization tool. It uses an algorithm that minimizes the amount of data copied by only moving the portions of files that have changed.

In this guide, we will cover the basic usage of this powerful utility. We will be using an Ubuntu 12.04 VPS in the examples, but you can use any modern Linux distribution to follow along.