Backup programs (Русский) - ArchWiki

# Backup programs (Русский)

Эта страница нуждается в сопроводителе

Статья не гарантирует актуальность информации. Помогите русскоязычному сообществу поддержкой подобных страниц. См. Команда переводчиков ArchWiki

## Введение

Эта статья содержит информацию о различных программах, предназначенных для резервного архивирования данных. Хорошая практика - использовать регулярные бекапы важной информации, особенно конфигурационных файлов (`/etc/*`) и локальной базы данных pacman'а (обычно `/var/lib/pacman/local/*`).

Несколько слов для окончаня введения: перед тем, как начать пробовать эти программы, подумайте о том, что именно вам нужно; например, решите следущие вопросы:

- Какой носитель данных у меня есть для хранения бекапов?
  - cd / dvd
  - удаленный сервер (По какому доступу? Ssh? Могу ли я устанавливать какие-нибудь программы на нем (необходимые, например, для решений, основанных на rsync)?)
  - внежний жесткий диск
- Как часто я собираюсь делать бекап?
  - ежедневно?
  - еженедельно?
  - еще реже?
- Какие преимущества я ожидаю от выбранного способа архивирования данных?
  - сжатие? (по каким алгоритмам?)
  - кодирование? (gpg или что-то более простое?)
- Самое главное: как я планирую восстанавливать бекапы когда это понадобится?

Ладно, с этим разобрались, давайте посмотрим варианты!

## Нарастающие бекапы (Incremental backups)

Основная особенность этого способа резервного копирования состоит в том, что в начале сохраняется полная копия(зеркало) данных, которые вы хотите резервировать. А далее сохраняется только то, чтобы было изменено, так называемые различия('diffs'). Если вы хотите часто делать бекапы, это - лучший вариант. Обычно файлы резервных копий не сжимаются и не шифруются, по этому всегда можно быстро получить рабочую копию данных. Но такой подход затрудняет записи архива на CD / DVD ..

##### Интерфейс командной строки(CLI)

- rsync (в репозитории extra)
  - Rsync почти всегда создает зеркало исходных данных.
  - Impossible to restore a backup before the most recent backup
  - Входит в стандартный набор пакетов всех дистрибутивов Linux
  - Может работать через SSH (порт 22) или родной протокол rsync (порт 873)
  - Доступна версия под Win32
- rdiff-backup (в репозитории community)
  - Stores most recent backup as regular files
  - To revert to older versions, you apply the diff files to recreate the older versions
  - It is granularly incremental (delta backup), it only stores changes to a file; will not create a new copy of a file upon change
  - Required python and librsync
  - Доступна версия под Win32
- rsnapshot (в репозитории community)
  - Does not store diffs, instead it copies entire files if they have changed
  - Creates hard links between a series of backed-up trees (snapshots)
  - It is differential in that the size of the backup is only the original backup size plus the size of all files that have changed since the last backup.
  - Destination filesystem must support hard links
  - Requires perl
  - Доступна версия под Win32
- SafeKeep (in AUR)
  - Enhancement to rdiff-backup
  - Integrates with Linux LVM and databases to create consistent backups
  - Bandwidth throttling
- Link-Backup (AUR may be patched with additional features) is similar to rsync based scripts, but does not use rsync
  - Creates hard links between a series of backed-up trees (snapshots)
  - Intelligently handles renames, moves, and duplicate files without additional storage or transfer
  - dstdir/.catalog is a catalog of all unique file instances; backup trees hard-link to the catalog
  - Transfer occurs over standard I/O locally or remotely between a client and server instance of this script
  - It copies itself to the server; it does not need to be installed on the server
  - Requires SSH for remote backups
  - It resumes stopped backups; it can even be told to run for n minutes

##### Графи́ческий интерфе́йс по́льзователя(GUI)

- Back In Time (in AUR)
  - Creates hard links between a series of backed-up trees (snapshots)
  - Inspired by FlyBack and TimeVault
  - Really is just a front-end to rsync, diff, cp
  - A new snapshot is created only if something changed since the last snapshot
- FlyBack (in AUR)
  - A clone of Apple's Mac OS X Time Machine software
- Areca Backup (in AUR)
  - Написана на Java
  - Primarily archive-based (ZIP), but will do file-based backup as well
  - Claims delta backup supported (stores only changes)
- TimeVault (in AUR)
  - Creates hard links between a series of backed-up trees (snapshots)
  - Imitates Windows Volume Shadow Copy feature in that it integrates with Nautilus to provide a "Previous Versions" tab in the Properties dialog.
- Luckybackup (in AUR)
  - Luckybackup it's an easy program to backup and sync your files.
  - Написана на C++ с использоваинем библиотеки Qt
  - It has Sync,Backup (with include and exclude options),Restore operations,Remote connection backup,Scheduled backups,Command line mode and more abilities.

### Не основаные на rsync

They tend to create (big) archive files (like tar.bz2), and (of course) keep track of what's been archived. Now creating tar.bz2 or tar.gz archives has the advantage that you can extract the backups with just tar/bzip2/gzip, so you don't need to have the backup program around.

- backup-manager (in AUR); homepage Backup Manager is a command line backup tool for GNU/Linux, designed to help you make daily archives of your file system. Written in bash and perl, it can make archives in lots of open formats (tar, gzip, bzip2, lzma, dar, zip) and provides lots of interesting features (such as network exports or CD/DVD automated-burning). The program is designed to be as easy to use as possible and is popular with desktop users and sysadmins. The whole backup process is defined in one full-documented configuration file which needs no more than 5 minutes to tune for your needs. It just works. Archives are kept for a given number of days and the upload system can use ftp or scp to transfer the generated archives to a list of remote hosts. Gettext is used for internationalization.
  - 1 configuration file, 5 minutes setup
  - Manually invoke backup process or run daily unattended via CRON
  - Backup files, MySQL databases and Subversion repositories
  - Specify multiple targets to backup at once (/etc, /home, etc…)
  - Ability to exclude files from backup
  - Automatically purge old backups
  - Full backup only or Full + Incremental backup
  - Backup to an attached disk, LAN or Internet
  - Burns backup to CD/DVD with MD5 checksum verification
  - Archives in lots of open formats: tar, gzip, bzip2, lzma, dar, zip
  - Slice archives to 2 GB if using dar archives format
  - Backup over SSH
  - Encrypts archives
  - Offsite remote upload of archives via FTP, SSH, RSYNC or Amazon S3
  - Can run with different configuration files concurrently
  - Easy external hooks
  - Simply uncompressed the open format backup archives with any command line or GUI tool

- arch-backup (в репозиторие community); website); trivial backup scripts with simple configuration:
  - compression method can be configured
  - possible to specify more directories to backup

- hdup (в репозиторие extra; website; it's no longer developed, the author develops rdup now (below); but it's still a decent one):
  - creates tar.gz or tar.bz2 archives
  - supports gpg encryption
  - supports pushing over ssh
  - possible to specify more directories to backup

- rdup (in AUR) successor to hdup: the program *just determines* which files have changed since the last backup. It's completely up to you what do you want to do with that list. Some helper scripts are supplied, and with them it supports:
  - creating tar.gz archives or rsync-type copy
  - encryption (gpg and usual strong (eg. blowfish)), also applies for rsync-type copy
  - compression (also for rsync-type copy)

- duplicity (в репозиторие community) is similar to hdup, supports tarring and encrypting. But:
  - the files backed up are "randomly" distributed between encrypted tar archives, which makes it harder to recover a particular file
  - you can backup just one directory at a time (while with hdup you can specify as many as you want in one backup profile)

- dar (в репозиторие community):
  - it uses its own format for archives (so you need to have it around when you want to restore)
  - supports splitting backups into more files by size
  - makefile-type config files, some custom scripts are available along with it
  - supports basic encryption (not gpg; but also strong, but you need to supply a password every time)
  - some gui tools for inspecting backups are also available (kdar, in AUR, but current dar needs beta version)
  - a script suitable for running from cron is sarab (in AUR): supports pretty much any backup scheme (Towers of Hanoi, Grandfather-Father-Son, etc..)

- backerupper (in AUR) Backerupper is a simple program for backing up selected directories over a local network. Its main intended purpose is backing up a user's personal data.
  - GUI based
  - creating tar.gz archives
  - possible to define : backup frequency, backup time, Max copies

- Manent (in AUR) is an algorithmically strong backup and archival program. It's Python based and has the following features:
  - Efficient backup to anything that looks like a storage
  - Works well over a slow and unreliable network
  - Offers online access to the contents of the backup
  - Backed up storage is completely encrypted
  - Several computers can use the same storage for backup, automatically sharing data
  - Not reliant on timestamps of the remote system to detect changes
  - Cross-platform support for Unicode file names

### Cloud backups

- Dropbox (in AUR with Gnome support, and also AUR without Gnome dependencies).
  - A daemon monitors a specified directory, and uploads incremental changes to Dropbox.com.
  - Changes automatically show up on your other computers.
  - Includes file sharing and a public directory.
  - You can recover deleted files.
  - Community written add-ons.
  - Free accounts have 2GB storage.

- Jungle Disk (in AUR)
  - Automatic backups to Amazon's servers.
  - Not free, but very low prices.

## Not incremental backups

- Q7Z (in AUR) is a P7Zip GUI for Linux, which attempts to simplify data compression and backup. It can create the following archive types: 7z, BZip2, Zip, GZip, Tar. Use Q7Z if you want to:
  - Update existing archives quickly
  - Backup multiple folders to a storage location
  - Create or extract protected archives
  - Lessen effort by using archiving profiles and lists
- "Just copy everything into one big archive, but support writing to cd/dvd"-type: backup-manager (in AUR)
- Partclone -- back up and restore only the used blocks of a partition
- filesystem-backup -- simple bash script (was originally a MySQL backup script) that creates a rolling 7 days, rolling 4 weeks and static monthly backups in tar format. Good for servers without a GUI. Available in repo: http://repo.falconn.nl/any/
- Clonezilla
  - Boots from live CD, USB flash drive, or PXE server
  - Uses Partimage, ntfsclone, partclone, and dd,
  - Compatability with many file systems (ext2, ext3, ext4, reiserfs, xfs, jfs of GNU/Linux, FAT, NTFS, and HFS+)
  - Multicasting server to restore to many machines at once
  - If file system is supported , only used blocks in harddisk are saved and restored. For unsupported file system, sector-to-sector copy is done
- Partimage
- Fsarchiver (в репозиторие extra)
  - Support for basic file attributes (permissions, owner, ...)
  - Support for multiple file-systems per archive
  - Support for extended attributes (they are used by SELinux)
  - Support the basic file-system attributes (label, uuid, block-size) for all linux file-systems
  - Support for ntfs filesystems (ability to create flexible clones of windows partitions)
  - Checksumming of everything which is written in the archive (headers, data blocks, whole files)
  - Ability to restore an archive which is corrupt (it will just skip the current file)
  - Multi-threaded lzo, gzip, bzip2, lzma compression: if you have a dual-core / quad-core it will use all the power of your cpu
  - Lzma compression (slow but very efficient algorithm) to make your archive smaller.
  - Support for splitting large archives into several files with a fixed maximum size
  - Encryption of the archive using a password. Based on blowfish from libcrypto from openssl.
  - Support backup of a mounted root filesystem (-A option)

## Versioning systems

These are traditionally used for keeping track of software development; but if you want to have a simple way to manage your config files in one directory, it might be a good solution.

- mercurial or git (both in extra repo)
- gibak: a backup system based on git. it also supports binary diffs (for binaries, e-books, pictures, multimedia files, etc). on the homepage there is a short usage advice. it is meant to backup only the $HOME directory. one could also backup other directories (like /etc) by changing the $HOME variable to point to that directory (though i don't really recommend this). gibak is handy for people who are familiar with git. it uses .gitignore to filter files and one can use the git commands to restore files, browse through logs, diffs, etc. if one needs a gui, it is also possible to use gitk or qgit to browse through commits or do whatever these interfaces support. get it from AUR: https://aur.archlinux.org/packages.php?ID=18318.

## Articles

- Backing up Linux and other Unix(-like) systems

Category:

- Русский