[SOLVED] Best way to full backup entire system

New to Debian (Or Linux in general)? Ask your questions here!

[SOLVED] Best way to full backup entire system

Postby banderas20 » 2018-07-26 14:30

Hello.

I'd like to know which is the best way to perform a full backup of a full Debian/Linux system. Something I can restore in case of disaster. In windows I know Acronis, Veeam, etc...

¿How about Linux?

Thanks!
Last edited by banderas20 on 2018-07-27 05:30, edited 1 time in total.
banderas20
 
Posts: 100
Joined: 2016-11-10 15:30

Re: Best way to full backup entire system

Postby arzgi » 2018-07-26 14:54

banderas20 wrote:Hello.

I'd like to know which is the best way to perform a full backup of a full Debian/Linux system. Something I can restore in case of disaster. In windows I know Acronis, Veeam, etc...

¿How about Linux?


There are many backup systems in the repo, just use
Code: Select all
aptitude search
, or you could use
Code: Select all
rsync

I don't think it's necessary to backup everything, as it is quite quick to install base Debian from net. There fore I (and many others) backup only /home, and if you have changed configs, then maybe /etc.

Debian can also be cloned using
Code: Select all
dpkg --get-selections/--set-selections
arzgi
 
Posts: 284
Joined: 2008-02-21 17:03
Location: Finland

Re: Best way to full backup entire system

Postby cds60601 » 2018-07-26 15:02

This depends on how simply and how full of a restore you want.
If you want an exact image that you can have installed and then boot - I would say look into CloneZilla.
Fast and easy, can boot from USB and depending on the size of the drive, the image can be saved off to a USB thumb-drive or USB externals drive.

Now if its just for data (as in /home) then yes, an rsync of some sort would be more appropriate.
Something like rsnapshot, rsync, rdiff-backup (to name a few, but there are others)
Yeah, 220, 221. Whatever it takes.
User avatar
cds60601
 
Posts: 125
Joined: 2017-11-25 05:58

Re: Best way to full backup entire system

Postby Head_on_a_Stick » 2018-07-26 15:24

E Pluribus Unix
User avatar
Head_on_a_Stick
 
Posts: 7785
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Best way to full backup entire system

Postby GarryRicketson » 2018-07-26 16:01

The "Best way to full backup entire system", The answer to this will vary, depending on what one prefers, the method you prefer will be the best way.
There are many methods to do this.
A good way to find out about them is :
Best way to full backup entire linux system
(for windows or other OS, replace "linux" with any OS)

Personally I prefer using "rsync", and also in many cases the 'dd' command,
Code: Select all
man rsync

Code: Select all
man dd

I use portable usb drives to store my backups. I do not keep them on the desktop PC, for obvious reasons, such as if something goes wrong with the PC and it can not be booted, if the backup was on it , I would not be able to use the backup either.
User avatar
GarryRicketson
 
Posts: 4957
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Best way to full backup entire system

Postby banderas20 » 2018-07-26 17:29

Do these methods work while the filesystem is mounted, or all of them need to be booted from a live-USB?

I don't think dd works from a live USB, for instance.

Thank you so much!
banderas20
 
Posts: 100
Joined: 2016-11-10 15:30

Re: Best way to full backup entire system

Postby GarryRicketson » 2018-07-26 18:15

I run the 'dd' command from a Live device (usb), it works just fine.

It is best to not have the drive mounted, especially if you are trying to make
a backup of the entire system. If the system you are trying to make a back up of is mounted, there are various processes going on, and these are constantly changing, and it just does not work out very well , usually.
Post by banderas20 » 2018-07-26 08:30
Hello.

I'd like to know which is the best way to perform a full backup of a full Debian/Linux system.

Your question is really pretty vague, to give details on what specifically
might be best, we would need to know more about the system. For example
if it is a server ? If the server has data base, or bases, like MYSQL, or Mariadb, the data bases should be backed up separately , and that would be another topic.

banderas20 >I don't think dd works from a live USB, for instance.

You can think, or not think what ever you want, but if you read some documentation, and perhaps actually try using some of the commands available, read the manuals on using them. After actually using a command, and seeing what it can do, then you can base your "thinking" on some facts.
I will add, the 'dd' command should not be used by some one that is unwilling or unable to read the manual, and also some of the many good tutorial available, and then it is best to try some things on devices that don't matter,
DO NOT use the 'dd' command if you do not fully understand what you are doing, especially as root, it can completely wipe your drive, or even in just a few seconds wipe the mbr, and leave you with a unbootable system, it is slow,
but reliable , when used correctly. On a large drive, say 500gb, it will take a few hours to make a complete backup, of the entire system.
'rsync' is fine as well, but I had problems with the data base being corrupted when I used it on a server, so I learned to do the mysql data base separate,..
maybe I did not run the 'rsync' command exactly correctly....
But I do use it to make quick backups of the non system files, IE: /home/usename/ , etc.
The 'dd' command is what I use to clone a entire drive, and it can be run from a live usb, with the drive I want to clone not mounted. How ever others have other preferences, If you "think" it can not be used, then don't use it, use some of the other methods suggested.

by banderas20 » 2018-07-26 11:29
Do these methods work while the filesystem is mounted, or all of them need to be booted from a live-USB?

It does not look like you are reading any of it, I am beiginning to think we are just wasting time here.
rsync will work even while the system is running, but files changed during the transfer may or may not be transferred, which can cause undefined behavior of some programs using the transferred files.


If you read some of the links all ready posted, and the information, you might learn enough to make a decision on what to use;
For example , what H_O_A-S posted:
From:https://wiki.archlinux.org/index.php/Rsync#Full_system_backup Full system backup
Full system backup

This section is about using rsync to transfer a copy of the entire / tree, excluding a few selected folders. This approach is considered to be better than disk cloning with dd since it allows for a different size, partition table and filesystem to be used, and better than copying with cp -a as well, because it allows greater control over file permissions, attributes, Access Control Lists and extended attributes.

rsync will work even while the system is running, but files changed during the transfer may or may not be transferred, which can cause undefined behavior of some programs using the transferred files.

This approach works well for migrating an existing installation to a new hard drive or SSD.

Run the following command as root to make sure that rsync can access all system files and preserve the ownership:

=============
User avatar
GarryRicketson
 
Posts: 4957
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Best way to full backup entire system

Postby banderas20 » 2018-07-26 18:31

GarryRicketson wrote: It does not look like you are reading any of it, I am beiginning to think we are just wasting time here.


First of all, I'm a newbie (posting under "Beginners Questions"), so if you think you're wasting your time, simply don't answer.
Second, thank you for your explanations. I doubted about usind "dd" from a live USB since it's a "simple" built in command. Not a big software like clonezilla, for instance.

Forgive my ignorance, and thank you again.
banderas20
 
Posts: 100
Joined: 2016-11-10 15:30

Re: Best way to full backup entire system

Postby Wheelerof4te » 2018-07-26 19:02

https://github.com/teejee2008/timeshift

It does require the knowledge to compile software from source, though.
User avatar
Wheelerof4te
 
Posts: 1076
Joined: 2015-08-30 20:14

Re: Best way to full backup entire system

Postby GarryRicketson » 2018-07-26 19:09

I doubted about usind "dd" from a live USB since it's a "simple" built in command. Not a big software like clonezilla, for instance.

It is a simple command, but considered essential, that is why it is included in even a simple "base" installation.
Yes "clonezilla" is "big software", and I don't want to get into any arguments about what is "best", as I said earlier, the "best" is a matter of what works, and is preferred by a individual.
I have seen "clonezilla" recommended by a lot of people, but to be honest, personally I never had any success with it, and was never able to use any backups made with it.
My experience is usually the "simple" built in commands are much more versatile, powerful and reliable then most of the so called "big software",
but that would be another topic.

On the dd command: https://wiki.archlinux.org/index.php/disk_cloning
There are other tutorials, keywords:
Code: Select all
How to use the dd command to back up the entire system

And to get a idea about how "simple" the command is :
Key words:
Code: Select all
How to use the dd command

https://linoxide.com/linux-command/linux-dd-command-create-1gb-file/
Is just 1 of many, but the point is, it is not as "simple" as it may appear, there are many things that the command can be used for,

banderas20 »so if you think you're wasting your time, simply don't answer.

Well, even if you don't read anything shown here, there might be other beginners that actually do read some of the information in the links provided.
User avatar
GarryRicketson
 
Posts: 4957
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Best way to full backup entire system

Postby banderas20 » 2018-07-27 05:30

Thanks!
banderas20
 
Posts: 100
Joined: 2016-11-10 15:30

Re: [SOLVED] Best way to full backup entire system

Postby sunrat » 2018-07-27 06:35

Clonezilla works fine for me and you can choose to back up an entire disk or individual partitions with optional compression. Takes less than 5 minutes to back up a 20GB partition to an external HD and a similar time to restore. dd is also fine but easier to make a mistake and wipe out a whole drive.
Personally I do a system backup whenever I'm about to make big changes that could break stuff, but also back up my data every day with rsync. I tried rsnapshot for a while and it was excellent but overkill for the amount I use the computer.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2391
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: [SOLVED] Best way to full backup entire system

Postby arzgi » 2018-07-27 06:41

It is good to consider, that backups are not once of things, many years old full backup does not help, when disaster comes.

Using rsync, or rsync-based utilities or some backup software, enables doing incremental backups, meaninng only changed files are saved. This makes backups much faster.

Backup should be as easy as possible, that one bothers to do it enough often.

And also test your backups, it will too late to nocitce that it wont work, when you need it.
arzgi
 
Posts: 284
Joined: 2008-02-21 17:03
Location: Finland

Re: [SOLVED] Best way to full backup entire system

Postby cds60601 » 2018-07-27 15:24

sunrat wrote:Clonezilla works fine for me and you can choose to back up an entire disk or individual partitions with optional compression. Takes less than 5 minutes to back up a 20GB partition to an external HD and a similar time to restore. dd is also fine but easier to make a mistake and wipe out a whole drive.
Personally I do a system backup whenever I'm about to make big changes that could break stuff, but also back up my data every day with rsync. I tried rsnapshot for a while and it was excellent but overkill for the amount I use the computer.


+1 on your whole comment, sunrat.

This is exactly how I manage my production laptop. If something major will be done, clonezilla takes the stage. And like you, I run a nightly rsync for data only changes and that for me is only about 900M (on average) for the times I would simply want a clean install from Debian media.

All options are good options as they all will work and in the end, it just comes down to what the end user is comfortable with and want. Can't say anything bad about any of the options - and that's always a good thing!

Cheers
Chris
Yeah, 220, 221. Whatever it takes.
User avatar
cds60601
 
Posts: 125
Joined: 2017-11-25 05:58

Re: [SOLVED] Best way to full backup entire system

Postby banderas20 » 2018-07-27 16:46

Thank you all.

BTW, what about Veeam Backup?

Regards!
banderas20
 
Posts: 100
Joined: 2016-11-10 15:30

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable