This project emphasizes the design and development of an automated data backup and restore process using Secure Socket Shell (SSH) over Local Area Network (LAN). The solution supports compression, deduplication, and encryption for enhanced data protection. The backup tools employed include Rsync over SSH, GPG key, and cron for automation. Webmin is utilized for user-friendly administration.
Two Linux-based machines are used in this project, with CentOS chosen for its stability and security compared to Ubuntu. CentOS Minimal is preferred to minimize disk space usage and maintain a functional system.
Specification | Lenovo Z50-70 Notebook | Samsung NP-N148 Netbook |
---|---|---|
Processor | Intel (R) Core TM i5-4210U CPU @ 1.70GHz 2.40Ghz | Intel (R) Atom TM CPU N455 @ 1.66GHz * 2 |
RAM | 4.00 GB | 1.00 GB |
System Type | 64-bit | 64-bit |
Disk | 1TB | 250 GB |
CentOS Edition | CentOS 7 | CentOS 7 |
The local machine is connected to the backup machine through LAN, established using a switch and LAN cable. IP addresses are assigned to the respective interfaces of both machines for seamless data sharing.
To secure data transfer, SSH keys are generated, allowing encrypted communication between machines. The process involves:
- Generating SSH key pair on the client machine.
- Copying the public key to the server machine.
- Disabling password login for the root user.
GPG is utilized for file encryption and decryption. The steps involve creating a new primary keypair and setting a passphrase.
Rclone is employed for syncing files to and from various cloud storage platforms, including Google Drive. The process includes installing Rclone, generating configuration files, and obtaining necessary credentials.
A shell script is developed to automate the backup process, utilizing SSH, Rsync, Rclone, and GPG for secure and efficient data transfer.
Rsync is employed for efficient file synchronization, offering options for compression, checksum verification, and partial transfers.
Hard links are used to optimize storage space by creating links to existing files. This allows for efficient incremental backups.
Webmin serves as a web-based system administration tool, providing an intuitive interface for managing server configurations.
Cron is utilized to schedule automated tasks, including the backup process. Tasks can be set to run at specified intervals.
Data from the source directory is encrypted and compressed using GPG, then backed up to the destination directory via Rsync with hard links. Incremental backups are organized by day and week.
Data restoration involves reversing the backup process. Files can be selectively restored, and decryption is performed to retrieve the original data.