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

 

 

 

How do you backup your Linux? (Share!!)

Off-Topic discussions about science, technology, and non Debian specific topics.
Message
Author
andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: How do you backup your Linux? (Share!!)

#16 Post by andre@home »

We also cloned the whole system to a spare drive.... so getting back on line when the bootdisk fails... takes only a few minutes.
And all data are present on 2 severs on 2 completely different locations (another house).

PhilGil
Posts: 384
Joined: 2010-05-08 16:43

Re: How do you backup your Linux? (Share!!)

#17 Post by PhilGil »

I only back up my home partition.

Nightly incremental backups to a USB hard drive using backintime.
Weekly rsync backups to a portable HDD which I store at my office.
I sync a handful of my most important files (such as my keepass DB) on Dropbox, so they're also backed up there.

BowCatShot
Posts: 959
Joined: 2006-07-15 12:08

Re: How do you backup your Linux? (Share!!)

#18 Post by BowCatShot »

With clonezilla. I install all of my debians as single partition systems, except for swap. I know, by backing up on a partition basis I lose the ability to recover individual files. But, over the years, I've been able to recover from countless screw ups, quickly and effortlessly just by restoring from the backup partition. Then I'm up and running again without worrying about figuring out which individual files to restore. I've tried the individual file method in the past and often had the recovery fail because some particular corrupted file wasn't included in the backup.

Patser
Posts: 4
Joined: 2016-03-01 19:31

Re: How do you backup your Linux? (Share!!)

#19 Post by Patser »

You also might want to look at clonezilla which is a linux rebuild of the good old norton ghost.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: How do you backup your Linux? (Share!!)

#20 Post by pylkko »

I just learned today that you can in theory dd an entire partition over netcat (on home LAN).

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1418
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 191 times

Re: How do you backup your Linux? (Share!!)

#21 Post by steve_v »

pylkko wrote:I just learned today that you can in theory dd an entire partition over netcat.
You can anything over netcat, add gzip & ssh and you have remote replication... sort of. This won't maintain consistency of a live/mounted filesystem though.
This is the primary reason I'm using ZFS wherever I can, online snapshots that can be piped through netcat or ssh. :)

Which brings me to:
Anyone know how to do online (mounted /), reliable, bootable backups on ext4?

I have had reasonable success with a straight rsync copy of / and /boot, if grub is installed the copy is even bootable (so far)... I suspect this could do unpleasant things to rapidly changing files, but in practice I've had no issues. Is there a better way on ext4?
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: How do you backup your Linux? (Share!!)

#22 Post by pylkko »

Maybe make / to not have anything that changes all the time like /tmp and /var? Or do the backup before the machine goes live?Or, maybe if the partition isn't too large, have a non-live duplicate of it that it is mirrored from the real once a day, and then always backup the duplicate (which is static)?


steve_v wrote: Which brings me to:
Anyone know how to do online (mounted /), reliable, bootable backups on ext4?

I have had reasonable success with a straight rsync copy of / and /boot, if grub is installed the copy is even bootable (so far)... I suspect this could do unpleasant things to rapidly changing files, but in practice I've had no issues. Is there a better way on ext4?

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1418
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 191 times

Re: How do you backup your Linux? (Share!!)

#23 Post by steve_v »

pylkko wrote:Maybe make / to not have anything that changes all the time like /tmp and /var?
This defeats the point, as I'm looking to do a snapshot of the entire machine, without rebooting it. What happens if the backup runs when something else is happening on /, like a package manager operation? --> no guarantee of a consistent system state.
Or do the backup before the machine goes live?
Again, without rebooting, and without human intervention. I do an image after install already, but this is a one-time manual thing.
have a non-live duplicate of it that it is mirrored from the real once a day, and then always backup the duplicate (which is static)?
But this would have the same issue as simply rsyncing straight from the source disk, in that the 'mirror' won't be entirely consistent - files may have changed while being copied.

The real question boils down to: How do I get an atomic snapshot of a running (ext4) machine to send to a backup server?
I can do this with ZFS root, but this is a pain to set up, requires patched grub, and means no recovery from the installer image as no ZFS modules.
I hear LVM can do snapshots - anyone use this to backup live machines? What's your restore procedure?
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

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: How do you backup your Linux? (Share!!)

#24 Post by Head_on_a_Stick »

@steve_v -- have a look at snapper
deadbang

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1418
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 191 times

Re: How do you backup your Linux? (Share!!)

#25 Post by steve_v »

Head_on_a_Stick wrote:@steve_v -- have a look at snapper
Looking good until I see:
Does snapper support ext4?

Yes, but only experimentally and you need a special kernel and e2fsprogs. For more information see the next4 project.
So back to the custom kernel / modules / stuff that's not in the install image. :evil:

I'm not seeing anything for ext4 that remotely compares with "zfs snapshot <filesystem> && zfs send <snapshot> | ssh <remote> zfs recv <filesystem>" or "btrfs subvolume snapshot <filesystem> <snapshot> && btrfs send <snapshot> | ssh <remote> btrfs receive <filesystem>".

I'd use BTRFS on /... but all the docs I can find say the installer still doesn't support installation to BTRFS mirrors - so it's not much less hassle than ZFS.

The LVM examples I've seen all require reams of bash and obscure commands I certainly won't remember when it comes time to restore a backup.

Seriously, there's no way to do this without a bunch of LVM complexity, custom FS drivers or bleeding-edge / out-of-tree modules?
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: How do you backup your Linux? (Share!!)

#26 Post by pylkko »

How about, don't backup at all, but live mirror the entire system on two machines, have the other one ping all the time, and then if the first one stops responding, the second one takes over? :P

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1418
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 191 times

Re: How do you backup your Linux? (Share!!)

#27 Post by steve_v »

pylkko wrote:How about, don't backup at all, but live mirror the entire system on two machines, have the other one ping all the time, and then if the first one stops responding, the second one takes over? :P
Yeah, done where it's appropriate, and with better HA tools than 'ping'.
But I'd still like to back up without rebooting, or at least not have machines offline for ~20 minutes to do it. It needs to be bootable / restorable with the install media, and ideally, done over ssh with no user input.

OSX can (Time machine).
Solaris can (ZFS).
BSD can (ZFS).
Windows can (Windows backup + shadow copy).
Debian... ??? dunno. Surely there must be a simple, reliable way to do the same.

I already have backups of user data and configuration, but at present this means a (potentially) lengthy reinstall + restore data, or updating from a stale disk image. I can live with this, but it's more aggro than I need.
As I said, rsync seems to work... I just don't *trust* it, because it doesn't do an atomic snapshot of the filsystem state.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: How do you backup your Linux? (Share!!)

#28 Post by bester69 »

Perfect BackUp -THIS!!!

Deduplication backup-------IN THE CLOUD
ATTIC /home/user > /media/mybackup --> (local backup)
DUPLICITY /media/mybackup webdavs://BOX.COM --> (sync up cloud BOX)


BOX features:
- 10 Gb Free
- 250 Mb maxm file size. (using duplicity bypass limitation size because a25Mb chunk size)
- Integration with data loss prevention systems (Data loss prevention main reason to use BOX)
- Two-factor authentication
- Email validation when logging in.
- Email warnings activity
- Secure Sockets Layer (SSL) and AES-256 bit encryption
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

Post Reply