Backup Management
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 the data storage environment by taking snapshots, which are then copied to another location as backup replicas. The data backup is in the same format as the original, making recovery faster.
The Backup does not require a backup server or a media server.
Cloud-hosted storage solutions include Google Drive, Dropbox, Box, and others.
Directory-as-a-Service (DaaS) is the cloud-hosted directory alternative to Active Directory and OpenLDAP. It provides a 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 with the intuitive options to Backup and restore without 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 the organization’s 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 of large amounts of stored data
- Delivers faster file transfer than 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 detect data changes since the last Backup.
- Archive Tools – tar: For particular files and directories, tar is used with tape devices to create compressed archives. The cron-utility is 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 backtape
BackupPC
It provides network and local backup of systems or hosts, including servers or single systems, using configured rsync and tar tools without client application. BackupPC set using the Web-Page configuration interface with the /backup name attached like https://ananova.com/backuppc. Backup is done on a local hard disk or network storage like shared partitions or storage servers. It uses compression and detection of identical files to reduce initial Backup significantly. Thus, only take backups of changed files. BackupPC script starts service /etc/init.d/backup. Its configuration files are located at /etc/BackupPC and config.pl hold configuration options and host life list to be backed up.
rsync
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 is configured by default to use SSH remote shell.
sync 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 174.142.46.71:/var/lib/mysql/*.sql /home/backup/MySQL/ –bwlimit=128
The above example copies all ‘.sql’ files in /var/lib/mysql of 174.142.46.71 server to /home/backup/mysql directory, creating corresponding sub-directories if required.
Options
- -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.
