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

 

 

 

[Software] Backup Solution needed

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
joybhowmik
Posts: 9
Joined: 2011-01-22 15:58

[Software] Backup Solution needed

#1 Post by joybhowmik »

Hello!
I have managed to install Debian 11.5 from the non-free firmware + Gnome + Debian 11.5 image. My machine is an Asus NUC (AMD64).


Here's how my storage looks:
[EFI]
/dev/sdd1 32 GB Thumb drive with an EFI Partition mounted at /boot/efi

[Main]
/dev/debian/root lvm 436 GB mounted at /
/dev/debian/swap lvm 64 GB
these volumes are part of a volume group > debian
the debian volume group is on a software raid1 device : /dev/md0 which in turn is composed of two physical drives
a) /dev/nvme0n1p1 (500GB)
b) /dev/sda1 (500GB)

[Data]
I also have another software raid1 device attached : /dev/md1 mounted as /mnt/nfs-share
which is composed of the following two physical drives
/dev/sdb1 : 2 TB
/dev/sdc1: 2 TB


Things are stable for now - after an incredibly arduous and sometimes frustrating journey.
I would not like to repeat the journey if I can help it - hence the need for a backup solution that preserves the softwares installed and configurations made.
This is to avoid a situation where I screw something up (in the future) , and have to have a way to quickly restore to a known 'good point' (sort of like a Windows Restore)
I don't need to have the [Data] backed up - it already is.

I have already looked at Clonezilla - but when I reached the point where it asked me to choose between the physical disks /dev/nvme0n1p1 or /dev/sda1 , I back-tracked and aborted. I realized that there's no way Clonezilla will be aware of a software raid and an lvm composed of swap and root volumes.

So the backup solution needs to be able to preserve
i) the OS,
ii) the installed software,
iii) the configuration of volumes , volume groups and raid configurations on [Main]
iv) [EFI],
v) any configurations pertaining to [Data] (not Data itself).

Also, Restoration should be easy.

Will be grateful for ideas/suggestions!

User avatar
PsychoHermit
Posts: 65
Joined: 2022-08-16 04:17
Location: Carson City, Nv
Has thanked: 6 times
Been thanked: 2 times

Re: [Software] Backup Solution needed

#2 Post by PsychoHermit »

Have you looked at timeshift? That's what I use.

--glenn

jmgibson1981
Posts: 295
Joined: 2015-06-07 14:38
Has thanked: 11 times
Been thanked: 32 times

Re: [Software] Backup Solution needed

#3 Post by jmgibson1981 »

+1 for Timeshift. Damn near foolproof. Another option is tarballs but Timeshift is much more efficient.

Personally I have a multi stage backup thing going. Recently redid Debian on my desktop, was Arch for awhile.
Running a few backup scripts along with Timeshift.

https://gitlab.com/jmgibson1981/homescr ... backups.sh

This one is run by 2 separate systemd timers as the user. Using Duplicity for most of home with rdiff-backup for the bigger non changing data stuff where I likely won't need easy mode to get an older version of something. Steam, Wine, Kodi data, and my Minecraft folder. The duplicity part of the script configures my Deja-Dup to the target point so it's fairly seamless and can restore with the gui as needed. As most of my Rdiff-backup stuff is in flatpaks it's only 2 folders, ~/.var and ~/.minecraft. Everything else via Duplicity.

https://gitlab.com/jmgibson1981/homescr ... /lvmtar.sh

This one is run monthly. Pretty self explanatory. Snapshot tarballs.

And finally Timeshift runs hourly and keeps 4 hours + 1 weekly and 1 monthly. As it only works to a local drive location it's the local backups. Everything else goes to my server.
he configuration of volumes , volume groups and raid configurations on [Main]
As Clonezilla has access to a command line / can be installed in live boot then it's trivial to make your own new layout. Just be sure to adjust the fstab to match it. Not requiring this feature gives you more flexibility as you can restore however you want to whatever you want. You aren't hardlocked to a give drive configuration.

User avatar
artytux
Posts: 77
Joined: 2022-10-20 09:00
Has thanked: 18 times
Been thanked: 14 times

Re: [Software] Backup Solution needed

#4 Post by artytux »

Hello
BackInTime for all my Data that's on 2 ExtHDs and TimeShift with the option 'Include All Files' that's root and home, I have been told my routine of BITBTS is overdoing it, done usually at end of long session and/or end of day, NOT overdone if and when files get destroyed when machines breakdown.
Regards
artytux

wonder
Posts: 120
Joined: 2022-09-09 02:30
Has thanked: 50 times
Been thanked: 5 times

Re: [Software] Backup Solution needed

#5 Post by wonder »

Good,
Taking advantage of this thread and I was precisely looking for something to backup... I have software to backup my files, I use LuckyBackup, but for the entire system, I have heard of Timeshift but I have never investigated in depth, as a result of this thread, I have inquired further. You can schedule a complete backup/image of the system...etc...which is just what interests me.

Currently, from time to time, with clonezilla, I make a backup of my hard drive, since it has a compression option, it doesn't take up much space, but if Timeshift can also compress and I can schedule regular backups... I think it's my option.
I have read that it is possible to restore in live mode (without entering debian) but that is the concept that has not been clear to me. Is it possible?

Thanks and regards!

User avatar
artytux
Posts: 77
Joined: 2022-10-20 09:00
Has thanked: 18 times
Been thanked: 14 times

Re: [Software] Backup Solution needed

#6 Post by artytux »

@wonder I have read that it is possible to restore in live mode (without entering debian) but that is the concept that has not been clear to me. Is it possible?
I have restored with timeshift using a live usb session = didn't go good and yes as root.
Not too sure why but on live usb session failed.

Better on installed system recovery when I have restored on ( self inflicted bad customizing idea uh KDE haha ) the installed distro timeshift worked and recovery was good.

Regards
artytux

wonder
Posts: 120
Joined: 2022-09-09 02:30
Has thanked: 50 times
Been thanked: 5 times

Re: [Software] Backup Solution needed

#7 Post by wonder »

artytux wrote: 2022-11-17 05:42
@wonder I have read that it is possible to restore in live mode (without entering debian) but that is the concept that has not been clear to me. Is it possible?
I have restored with timeshift using a live usb session = didn't go good and yes as root.
Not too sure why but on live usb session failed.

Better on installed system recovery when I have restored on ( self inflicted bad customizing idea uh KDE haha ) the installed distro timeshift worked and recovery was good.

Regards
artytux
That is my question, restore from usb live, but... with what usb live? For example, clonezilla can boot into live, when it says from usb live, what would live be?

You say that it did not restore you, not even as root... bad business then...

The best, on installed system recovery, but how to access the system if, for example, we have had a serious problem and we cannot access the system?... xD

Thanks and regards!

User avatar
artytux
Posts: 77
Joined: 2022-10-20 09:00
Has thanked: 18 times
Been thanked: 14 times

Re: [Software] Backup Solution needed

#8 Post by artytux »

@wonder but how to access the system if, for example, we have had a serious problem and we cannot access the system?... xD
I did have that happen luckily only once, wasn't sure back then how to fix, so re-installed distro ( always used the default install setting ) and yeah updated installed distro got Timeshift then did a restore and yep didn't work ( not a big problem ) so then open my Timeshift directory that's on separate ExtHD copied the home dot files from last Timeshift image over to new install and that restored the system back to where it was before I bricked the computer.
So yeah there is always ways of fixing so long as you have backups made and ( best part ) is learning a bit more.
I reckon there might be some easier way hey I didn't know (still don't) and the way I did it may be doing it the long hard way ( always seems to be ) thou it worked and that's all that mattered.

Never be put off using an app because of a bad review/opinion , your mileage may vary .

Regards
artytux

wonder
Posts: 120
Joined: 2022-09-09 02:30
Has thanked: 50 times
Been thanked: 5 times

Re: [Software] Backup Solution needed

#9 Post by wonder »

Sorry for the delay in answering.

I am looking for this, a backup system so that, in the event of a "total crash" either due to hardware or...you never know, I can restore my computer to the state where it was working.

Currently I make disk images with clonezilla, but... it may be a month and I haven't made any, so something like timeshift can be a solution. I've heard of it and so on, but I've never inquired about it.

The "advantage" that I see to clonezilla is that it compresses, and it is quite fast making the image.

They say it can be restored in live mode but... how? Booting system with a debian live for example?

If it's a matter of doing a fresh install and calling timeshift, it's not a big problem, the fact is that I do images regularly, either automatically or I indicate them manually. Log out of the system to make the clonezilla image... it's hard for me, I'm one of those who don't shut down, hibernate the pc :)

Regards!

pwzhangzz
Posts: 420
Joined: 2020-11-11 17:42
Has thanked: 9 times
Been thanked: 26 times

Re: [Software] Backup Solution needed

#10 Post by pwzhangzz »

Because we are running Debian Sid on our work machines, backups are a matter of everyday life. We have a relatively sophisticated but actually very simple backup solution.

Since we are talking about work machines, we cannot afford losing any time doing backups. With Debian, this can be easily implemented.

For every work (desktop) machine, we have at least five bootable partitions, one primary partition each for Debian 11 and 12, one backup partition for Debian 11, and two backup partitions for Debian 12. Each bootable partition is given 30 GB space (actually 20 GB should suffice). All those partitions share the same data partition, which is linked to all the five bootable partitions. We are primarily running Debian 12 (> 99% of the time). In case anything happens to the primary partition, we can instantly boot into a backup partition and rsync its content to the primary partition and wait for the problem to be solved. Debian developers are usually very quick in solving problems. Otherwise we can use the "apt-mark hold/unhold" command to block/unblock the problem packages from being upgraded.

Post Reply