Can I use snapshots as a backup? [SOLVED]

Message
Author
rs55
Posts: 273
Joined: Sun Feb 24, 2019 4:24 pm

Re: Can I use snapshots as a backup?

#11 Post by rs55 »

Sparky wrote: Sun Apr 21, 2019 2:15 pm
I would add that snapshot/live-usb also completely removes any anxiety about getting a virus , ransomware or some such. No need to slow down the system with virus-checkers etc - to protect against the remote probability of these things.
Is that a common thing in Linux? My drive is encrypted, should I still worry about it?
No - its not something I worry about: Linux is inherently much more secure than something like Windows:
1. You need to enter your root password to make system changes - unlike Windows
2. You install most of your apps from the repositories , not random websites ( like Windows).
3.You have control over everything that gets installed on your system - unlike Windows, where MS has a sort of godlike privilege to push whatever they want , whenever they want.

rs55
Posts: 273
Joined: Sun Feb 24, 2019 4:24 pm

Re: Can I use snapshots as a backup?

#12 Post by rs55 »

rs55 wrote: Sun Apr 21, 2019 2:28 pm
Sparky wrote: Sun Apr 21, 2019 2:15 pm
I would add that snapshot/live-usb also completely removes any anxiety about getting a virus , ransomware or some such. No need to slow down the system with virus-checkers etc - to protect against the remote probability of these things.
Is that a common thing in Linux? My drive is encrypted, should I still worry about it?
No - its not something I worry about: Linux is inherently much more secure than something like Windows:
1. You need to enter your root password to make system changes - unlike Windows
2. You install most of your apps from the repositories , not random websites ( like Windows).
3.You have control over everything that gets installed on your system - unlike Windows, where MS has a sort of godlike privilege to push whatever they want , whenever they want.
I have settled on a routine that gives me peace of mind
1. Once a week I make a snapshot (3 minutes) and create a live USB from it( 5 minutes). I exclude my "Documents" folder.
2. have Lucky Backup make a backup of my Documents folder in /home ( not all of /home which includes a lot of config files and such - just the Documents folder) - to a separate ssd - I am playing with the schedule, I currently have it do a backup everytime I boot up the machine ( maybe setting up a time-schedule is better , but Iam not sure what it does if , for instance, I say do it at 2am - and the computer is off at 2am).
3. Make a copy of the snapshot and Documents folder to an external HDD once in a while.

rs55
Posts: 273
Joined: Sun Feb 24, 2019 4:24 pm

Re: Can I use snapshots as a backup? [SOLVED]

#13 Post by rs55 »

A funny ( sad?) story of backups ( user error):
- i have a dual boot system with Win7 and MX on a drive. A seperate drive for "backups" ( NTFS) so I can access from either OS.
- i had LuckyBackup automatically backup my 'Documents" folder to that NTFS drive - on every login to MX.
- A week ago, I logged into Win7 ( I seem to use Win7 once a year to use TurboTax). And saved my final tax files in Documents in that NTFS partition.
- Then I started to re boot to get back to MX. And I realized even as it was booting up, that I had just managed to wipeout those tax files! And ofcourse LuckyBackup dutifully overwrote that Documents folder.
Ouch. Thats why I am rethinking when the backup should occur!

User avatar
Sparky
Posts: 1196
Joined: Sun Dec 23, 2018 7:07 pm

Re: Can I use snapshots as a backup? [SOLVED]

#14 Post by Sparky »

Yeah, I 'm stopping dual backup because of this. I lost all my vinyl albums that I had converted to mp3s a while back in Manjaro... Never going to dual boot again If I can avoid it.
MX Linux Asus F552, 12GB RAM, 500GB WD SSD MX19.2
Dell Inspiron 7559 16GB RAM 1X 256GB SSD & 1TB SSD MX KDE 21.1 & Windows 11
Mini Tower PC 2X 256GB SSD MX KDE21.1

User avatar
figueroa
Posts: 1053
Joined: Fri Dec 21, 2018 12:20 am

Re: Can I use snapshots as a backup?

#15 Post by figueroa »

rs55 wrote: Sun Apr 21, 2019 2:05 pm I would add that snapshot/live-usb also completely removes any anxiety about getting a virus , ransomware or some such. No need to slow down the system with virus-checkers etc - to protect against the remote probability of these things.
This thread is lapsing into imaginary problems and imaginary solutions. Making a snapshot, Timeshift, Luckybackup, all lead to the same objective of having a backup. The settings one uses, the number of and currency of one's backups, the location and reliability of your backup media are the variables that lead to different results.

What is your backup objective? Be sure you have a backup plan that accomplishes the objective. Know why you are doing what you are doing. Then do it regularly, preferably automatically.

You can use tar to make a tarball of all or the parts of your system that you want to backup. In the simplest form would be:

Code: Select all

tar czpf /backupdestination/backup.tgz --xattrs --numeric-owner /
You can put that into a script, run it directly from the command-line, or run it with root's crontab (requires root permission). If you just want to backup your home directory the command would be:

Code: Select all

tar czpf /backupdestination/homebackup.tgz  /home/user
You may put that into your own crontab.
Andy Figueroa
Using Unix from 1984; GNU/Linux from 1993

User avatar
BitJam
Developer
Posts: 2283
Joined: Sat Aug 22, 2009 11:36 pm

Re: Can I use snapshots as a backup?

#16 Post by BitJam »

figueroa wrote: Sun Apr 21, 2019 4:47 pm You can use tar to make a tarball of all or the parts of your system that you want to backup. In the simplest form would be: [...]
The dar program is vastly superior to tar for this sort of thing. It does just about everything you would want from a real backup program. The tar program is great for many things but it is terrible for backups.
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."

-- Richard Feynman

User avatar
figueroa
Posts: 1053
Joined: Fri Dec 21, 2018 12:20 am

Re: Can I use snapshots as a backup?

#17 Post by figueroa »

BitJam wrote: Sun Apr 21, 2019 10:27 pm
figueroa wrote: Sun Apr 21, 2019 4:47 pm You can use tar to make a tarball of all or the parts of your system that you want to backup. In the simplest form would be: [...]
The dar program is vastly superior to tar for this sort of thing. It does just about everything you would want from a real backup program. The tar program is great for many things but it is terrible for backups.
I thought you might say that, and I AGREE, but I've been using tar for backups for 20 years very successfully. It's not so easy to discard so much success. Tar is lousy for incremental backups, and impossible for incremental compressed backups, but I've got a system going which is a collection of home brewed shell scripts that run in the wee hours, both at home and in the enterprise. It's very inefficient, but who cares -- I'm sleeping and disk space is cheap.

Recently I've been using dar for my monthly backups (in addition to nightly and weekly rotating backups using tar) but it turns out that dar saves me little processing time or disk space because what takes up the most storage for me are large virtual machines.

Where am I going with this? I think I'm migrating to dar, over time, in whole, or in part. For newbies, I think dar is more difficult to get started with. My tar home directory backup script for users with simple needs is drop dead easy. If I were a newbie, I would use dar. If I was writing a backup program for others, I would use dar. The most important thing is to actually MAKE backups. Backup early, often, compulsively, and automatically if you are able.
Andy Figueroa
Using Unix from 1984; GNU/Linux from 1993

User avatar
BitJam
Developer
Posts: 2283
Joined: Sat Aug 22, 2009 11:36 pm

Re: Can I use snapshots as a backup?

#18 Post by BitJam »

figueroa wrote: Sun Apr 21, 2019 11:36 pm For newbies, I think dar is more difficult to get started with. My tar home directory backup script for users with simple needs is drop dead easy.
I agree there is more of a learning curve to dar but IMO the limitations of tar make it more difficult (unless you are only creating backups and never inspecting them or restoring). In order to get a list of the contents or to extract a single file from a tar archive, you need to unpack the whole thing which can take a lot of time. I've got a 12M tarball and it takes over a minute to get a list of the files inside. Dar is designed for doing backups while tar is not. Even a snapshot has benefits over tar because you can easily mount the linuxfs file and see everything inside and copy out any file you want.

I made a little suite of isomount programs to easily mount our iso files and live-usbs. I usually have at least two mounted at all times and often many more. I'm constantly making use of the random access this provides.

The way I see it, using tar for backups is kind of a bait and switch, at least for newbies. You imagine it's going to have the basic features of dar or even squashfs but it doesn't. So people can end up making backups with tar that are far far less useful than one thinks they would be. OTOH, I too will use tar to backup my hidden files and directories or to transfer them to a new system. But I would not use it for something big unless I knew I always wanted to just unpack all of it.

One of the things I've learned over the years is that it usually pays to create data structure so they are easy to access and read. To some extent, this is how and why search engines exist. Tar does not do this with your data but dar does. For passing data around, tar is great but when you are backing up a big systems, the limitations of tar come to the fore. The easiness of creating a tar backup can really come back to bite you.
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."

-- Richard Feynman

User avatar
Adrian
Developer
Posts: 8267
Joined: Wed Jul 12, 2006 1:42 am

Re: Can I use snapshots as a backup? [SOLVED]

#19 Post by Adrian »

Can you use a shovel to open a can? Yes. Is that the best tool though? Snapshot (and the name is probably not the best one) is meant for creating new ISOs from a live or installed system, creating your own custom distribution in a sense, it could be used for backup, it could be used for transferring your system on another computer, but it lacks a lot of features that a real backup program has, as BitJam mentioned dar is a specialized tool that can perform incremental, decremental and differential backups, it's probably worth learning it if you want a good backup solution.

User avatar
figueroa
Posts: 1053
Joined: Fri Dec 21, 2018 12:20 am

Re: Can I use snapshots as a backup? [SOLVED]

#20 Post by figueroa »

Yet dar is seldom offered in manuals, user guides, or on-line conversations as a backup tool. In fact, yesterday's DW weekly https://distrowatch.com/weekly.php?issue=20190422#poll included a poll on preferred backup tools that did not include dar as an option, and few backup programs use it. An Internet search for dar versus tar does not provide very satisfactory results. Users, don't be discouraged. Make backups. :-)
Andy Figueroa
Using Unix from 1984; GNU/Linux from 1993

Post Reply

Return to “General”