N
N
Nikita Parfenovich2018-04-17 12:40:48
linux
Nikita Parfenovich, 2018-04-17 12:40:48

linux. Backup the entire system HDD once a day. What are the ways?

Hello. There was a need to backup a certain server on which a DEB similar distribution kit for special purposes is running. There is not much data there, but not a little, the important thing is that the data is critical. Before me, no one made a backup there. So the question arose, how best to do them. Just copying directories and so on is an option, but I would like to make it so that in the event of a server crash, restore the backup to another server with minimal loss of time. What are you using gentlemen? LVM\BTRFS? Or something else? Share, if possible, your experience and observations

Answer the question

In order to leave comments, you need to log in

5 answer(s)
P
pfg21, 2018-04-17
@pfg21

option 1 - "classic" tar archive of the partition with the system.
there are disadvantages with a backup of files opened for writing (for example, logs, etc.) option 1a
- differential or complementary backup. with the --listed-incremental option is especially convenient for the system because system files rarely change.
option 1b - dar archiver - hands will not reach to try.
option 2 - file system snapshots. support is available on btrfs and zfs. snapshot solves problems with writable files by taking a snapshot of the system. more convenient, more functional.
the snapshot itself can be used as a quick "hot" backup.
option 3: offline copying the entire partition. you reboot the computer - you boot from the CD or something like that, and you make a copy of the partition through dd or other programs. minus: temporary decommissioning of the system is required.
it is better to archive partitions or directories with a database separately, because file archivers do not know how to properly backup a database, and working files may require additional backup parameters. but backup is getting more complicated.

S
Saboteur, 2018-04-17
@saboteur_kiev

Data dependent.
Their type (just documents that I took and copied, or, for example, a database + an application that requires software to be installed)
Data size (cost and time for backup)
Their importance for the company (that is, what budget).
There are many solutions. A raid is not a backup, but a fault tolerance. And so - just rsync directories or dd the entire partition - quite even.

A
alexander, 2018-04-17
@beza2000

Haven't used it, but I like the Relax-and-Recover approach.

R
Roman Mirilaczvili, 2018-04-17
@2ord

Install the Bacula File Daemon (client) on the destination server, and install the Bacula server part on the other server, which will store backups on its own or somewhere else, connecting periodically to the client server.
Bacula or its BareOS clone.
And you can, of course, engage in scripts, as others have advised.

D
Dmitry, 2018-04-18
@Angie_Larkin

snapshots, the most convenient and correct backup of a server in my opinion.
Dofiga software about this, timeshift for example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question