Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Best way to full backup entire system

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
banderas20
Posts: 111
Joined: 2016-11-10 15:30

[SOLVED] Best way to full backup entire system

#1 Post by banderas20 »

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.

arzgi
Posts: 1194
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Best way to full backup entire system

#2 Post by arzgi »

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

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 719
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 133 times
Been thanked: 63 times

Re: Best way to full backup entire system

#3 Post by cds60601 »

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)
Supercalifragilisticexpialidocious

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Best way to full backup entire system

#4 Post by Head_on_a_Stick »

deadbang

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

Re: Best way to full backup entire system

#5 Post by GarryRicketson »

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.

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: Best way to full backup entire system

#6 Post by banderas20 »

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!

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

Re: Best way to full backup entire system

#7 Post by GarryRicketson »

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/Rs ... tem_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:
=============

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: Best way to full backup entire system

#8 Post by banderas20 »

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.

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: Best way to full backup entire system

#9 Post by Wheelerof4te »

https://github.com/teejee2008/timeshift

It does require the knowledge to compile software from source, though.

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

Re: Best way to full backup entire system

#10 Post by GarryRicketson »

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/linu ... -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.

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: Best way to full backup entire system

#11 Post by banderas20 »

Thanks!

User avatar
sunrat
Administrator
Administrator
Posts: 6467
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 473 times

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

#12 Post by sunrat »

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!

arzgi
Posts: 1194
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

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

#13 Post by arzgi »

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.

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 719
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 133 times
Been thanked: 63 times

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

#14 Post by cds60601 »

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
Supercalifragilisticexpialidocious

banderas20
Posts: 111
Joined: 2016-11-10 15:30

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

#15 Post by banderas20 »

Thank you all.

BTW, what about Veeam Backup?

Regards!

User avatar
sunrat
Administrator
Administrator
Posts: 6467
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 473 times

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

#16 Post by sunrat »

banderas20 wrote:BTW, what about Veeam Backup?
That looks like a totally inappropriate solution for personal use. It's a proprietary enterprise package that costs money. The other suggestions here are all free, open source, and available from Debian repos.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

barlafuss
Posts: 25
Joined: 2007-11-11 17:49
Location: Milan

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

#17 Post by barlafuss »

My favour go to timeshift
https://github.com/teejee2008/Timeshift/releases
Very good for daily/weekly "trasparent" system backups and very good in restoring snapshots, in case of issue.

*Warning* : it does NOT back up /home folder, so You have to add any other manual/automatic script for that .

User avatar
sunrat
Administrator
Administrator
Posts: 6467
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 473 times

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

#18 Post by sunrat »

barlafuss wrote:My favour go to timeshift
https://github.com/teejee2008/Timeshift/releases
Very good for daily/weekly "trasparent" system backups and very good in restoring snapshots, in case of issue.

*Warning* : it does NOT back up /home folder, so You have to add any other manual/automatic script for that .
I have been told Timeshift can be configured to back up home in settings. Still, it's not in Debian repo so I'd prefer something from there. Timeshift is basically a GUI frontend for rsync and there are several rsync GUI programs in the repo such as Lucky Backup and Grsync.
rsync itself is pretty easy to set up so you don't really need a GUI, just maybe a few minutes to read, and test you have config right. Set it up to run automatically with a systemd timer or cron and let it do it's thing quietly in the background.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

barlafuss
Posts: 25
Joined: 2007-11-11 17:49
Location: Milan

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

#19 Post by barlafuss »

I understood from the request, User is not (yet) so good in doing itself a safe backup script.

Yes, timeshift is a GUI to rsync, but what a friend gui :-) for backup AND (!!) restore.

I used Lucky backup, but (at least at that time) no remote backup was allowed.

arzgi
Posts: 1194
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

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

#20 Post by arzgi »

barlafuss wrote:I understood from the request, User is not (yet) so good in doing itself a safe backup script.

Yes, timeshift is a GUI to rsync, but what a friend gui :-) for backup AND (!!) restore.

I used Lucky backup, but (at least at that time) no remote backup was allowed.


If you do

Code: Select all

apt search rsync
or

Code: Select all

apt search backup

it shows many pages of backup programs, some of them even for GUI.
And to see description for package

Code: Select all

apt show [package]
For example backintime, which has GUI versions, and works with ssh.

Security updates cover only Debian pacakages.

https://wiki.debian.org/DontBreakDebian

Maybe I'm a bit old schooler, but I don't want to be able to restore only from GUI.

Post Reply