The backup operation is an integral part of the administration. Most Linux administrators use Linux dumb/restore tools like rsync for making individual copies.
Flat Backup: It simplifies data storage environment by taking snapshots, which then copied to another location as backup replicas. The data backup taken is in the same format as the original, which makes a recovery faster.
The backup does not require a backup server or a media server.
Cloud Hosted Storage Solutions include Google Drive, Dropbox, Box, and many others.
Directory-as-a-Service (DaaS) is the cloud-hosted directory alternative to Active Directory and OpenLDAP. It provides centralized management platform to manage organizational resources, which includes NAS appliances and Samba file servers.
Backing up in Cloud – off-site Backup
Backup cloud storage provides clients the intuitive options to backup and restores without any complexity.
On-Premise Storage Options
NAS devices and Samba file servers (e.g. Synology, QNAP, FreeNAS)
Network Attached Storage (NAS)
File servers are conventional and on-premises implemented with directory services (e.g., Microsoft Active Directory® (AD) and OpenLDAP™). The tools manage user access to NAS devices. They hold organization most critical data and applications. Moving large files between on-premise and cloud is painful. Also, the regulatory requirements often force organizations to have NAS file servers.
- Allows sharing large amounts of stored data
- Delivers faster file transfer when compared with cloud-based alternatives such as Dropbox and Google Drive.
Linux Backup Tools
- Anaconda provides server-based backups.
- The dump tools refine the backup process and detecting data changed since the last backup
- Archive Tools – tar: For particular files and directories, tar used with tape devices for creating compressed archives. The cron-utility used to schedule backup with appropriate tar commands.
- GNOME File Roller to create archives available System Tools -> Archive Manager
- Amanda (Advanced Maryland Automatic Network Disk Archiver)
- KDE KDAT tool to back tapes
It provides network and local backup of system or hosts, including servers or single system using configured rsync and tar tools without client application. BackupPC set using the Web-Page configuration interface with the /backuppc name attached like https://ananova.com/backuppc. Backup is done on local-hard-disk or network storage like shared partitions or storage servers. It uses both compression and detection of identical files to reduce initial backup significantly. Thus only taking backup of changes files. BackupPC script starts service /etc/init.d/backuppc. Its configuration files located at /etc/BackupPC and config.pl hold configuration options and host life list to be backed up.
To backup changed directories or files from one host to another. It preserves the original ownership and permissions, provided the corresponding user exists on the host system. The rsync command configured by default to use SSH remote shell.
rync as a server daemon: It allows remote users to sync copies of files on a system with versions, thus transferring changed files only rather than entire directories.
- /etc/rsyncd.conf: Configuration information for rsync
- xinetd: manages the rsync as a server using /etc/xinetd.d/rsync file, which starts with the –daemon option.
- /etc/services file: list it to run on port 873 and is off by default, which a user can enable using tools like chkconfig (Fedora and SUSE) or sysv-rc-conf (Debian or Ubuntu).
rsync -ave “ssh -p 22” –exclude ‘i*' –numeric-ids 184.108.40.206:/var/lib/mysql/*.sql /home/backup/mysql/ –bwlimit=128
The above example copies all ‘.sql' files in /var/lib/mysql of 220.127.116.11 server to /home/backup/mysql directory, creating corresponding sub-directories if required.
- -t: specifies transfer
- -a: archive
- -z: compress the file
- -v: verbose mode
- -e: ssh option or set the RSYNC_RSH variable to ssh for secure transmission, i.e., encrypt copy operation.