LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux Mint (https://www.linuxquestions.org/questions/linux-mint-84/)
-   -   Backup for Dummies! (https://www.linuxquestions.org/questions/linux-mint-84/backup-for-dummies-4175720587/)

anon298 01-06-2023 11:16 AM

Backup for Dummies!
 
Guys, I've been using Rescuezilla 2.3.1 (Focal) to create routine, full backups of my Linux Mint 21.1 laptop installation (which is on a 500GB SSD) to an external, 500GB HDD; I also back up my /Home folder, separately, to the same, eternal 500GB HDD. This process works fine, but I wonder if I'm pushing my luck by continuously copying these backups to a HDD.

Also, while Rescuezilla works very nicely, it does require copying the entire disk, every time.

I'm not really proficient at the "terminal command line" level, so... is there easy-to-use GUI backup software available, that copies only changes that have been made since the previous backup?

Thanks, guys! :wink:

jailbait 01-06-2023 11:59 AM

Quote:

Originally Posted by FenderGuy (Post 6402639)
Also, while Rescuezilla works very nicely, it does require copying the entire disk, every time.

I'm not really proficient at the "terminal command line" level, so... is there easy-to-use GUI backup software available, that copies only changes that have been made since the previous backup?

You should switch to a backup method that only copies every file the first time you run it. Thereafter it only copies new files or files that have been changed. rsync is the best command line program to do this. I have set up several scripts to do my own backups using rsync. Here is a command script that I use to backup /home.

Code:

# Back up /home
if test ! -d /media/usb.hard.drive.401.1/home;
then
mkdir /media/usb.hard.drive.401.1/home
fi
rsync  -aru  --delete  /home  /media/usb.hard.drive.401.1

Perhaps somebody else can point you to a GUI program that acts as a front end to rsync.


p.s. Here is an explanation of the script:
The output is to go to a usb drive that is mounted as usb.hard.drive.401.1 on the directory /media. The if statement checks to see if there is a directory called /home on usb.hard.drive.401.1. If not then create a directory called /home on usb.hard.drive.401.1.

Then use rsync to copy the /home files to the /home directory on usb.hard.drive.401.1. The --delete parameter means that if a file is present on the backup but not present on /home then delete that file on the backup. I keep all backups for two weeks so that I don't make the mistake of deleting a file, rsync deletes it on the backup, and then I discover that I need to restore the missing file. But if you don't use --delete then the backup hard drive eventually gets filled up with garbage.

The -aru parameter means copy all subdirectories and files in /home and do not copy any files that are identical to the output files or older than the output files.

anon298 01-06-2023 09:42 PM

Quote:

Originally Posted by jailbait (Post 6402645)
You should switch to a backup method that only copies every file the first time you run it. Thereafter it only copies new files or files that have been changed. rsync is the best command line program to do this. I have set up several scripts to do my own backups using rsync. Here is a command script that I use to backup /home.

Code:

# Back up /home
if test ! -d /media/usb.hard.drive.401.1/home;
then
mkdir /media/usb.hard.drive.401.1/home
fi
rsync  -aru  --delete  /home  /media/usb.hard.drive.401.1

Perhaps somebody else can point you to a GUI program that acts as a front end to rsync.


p.s. Here is an explanation of the script:
The output is to go to a usb drive that is mounted as usb.hard.drive.401.1 on the directory /media. The if statement checks to see if there is a directory called /home on usb.hard.drive.401.1. If not then create a directory called /home on usb.hard.drive.401.1.

Then use rsync to copy the /home files to the /home directory on usb.hard.drive.401.1. The --delete parameter means that if a file is present on the backup but not present on /home then delete that file on the backup. I keep all backups for two weeks so that I don't make the mistake of deleting a file, rsync deletes it on the backup, and then I discover that I need to restore the missing file. But if you don't use --delete then the backup hard drive eventually gets filled up with garbage.

The -aru parameter means copy all subdirectories and files in /home and do not copy any files that are identical to the output files or older than the output files.

This makes good sense to me. Thanks, jailbait! ;)

Jan K. 01-07-2023 01:00 AM

Quote:

Originally Posted by FenderGuy (Post 6402717)
This makes good sense to me. Thanks, jailbait! ;)

Really?

To me this sounds like a disaster waiting to happen...

Quote:

Originally Posted by jailbait (Post 6402645)
...The --delete parameter means that if a file is present on the backup but not present on /home then delete that file on the backup.

At least you now can't come here whining later! :D

jailbait 01-07-2023 10:10 AM

Quote:

Originally Posted by Jan K. (Post 6402736)
Really?

To me this sounds like a disaster waiting to happen...



At least you now can't come here whining later! :D

It is a disaster waiting to happen if you only have one generation of backup. I keep generations of backup for at least two weeks both on and off site. So if I delete a file on my system it takes at least two weeks for the deletion to work its way through my backup generations. My house burned down in 2015 and the off site backup saved my bacon.

In addition you have the same problem when you update a file. The new version of the file overwrites the previous version on the backup. If you decide to go back to the old file after you back it up you will need generations of backup.

Jan K. 01-07-2023 01:08 PM

To me it sounds more like syncing disc sets... my backups contains all files ever created/saved.

My desktop drives are kept fairly clean from unwanted "clutter" and should I for some reason need older files, they can always be found in the backups/archive. Your suggestion will eventually make me end up with backup files = desktop files = synced discs.

Perhaps we just don't agree on the definition of "backup"? :D

jailbait 01-07-2023 01:20 PM

Quote:

Originally Posted by Jan K. (Post 6402872)
my backups contains all files ever created/saved.

Does your backup system have previous versions of currently existing files? The generation concept keeps old versions of files for two weeks. Only my first generation backup is synced with my current desktop files.

Jan K. 01-07-2023 11:33 PM

Quote:

Originally Posted by jailbait (Post 6402878)
Does your backup system have previous versions of currently existing files?

Backups are never altered or deleted. Only appended to with new files or files altered since last backup.

So you can of course go back into the archive and pick any previous (saved) version.

Quote:

Originally Posted by jailbait (Post 6402878)
The generation concept keeps old versions of files for two weeks. Only my first generation backup is synced with my current desktop files.

If you delete a folder or file, it's gone forever after two weeks?

Some documents I'm required to save for 5 or 10 years. Others I want to save forever.
But as I don't want my current workspace/-discs cluttered with these older, finished projects, they are deleted from pc and now only exists in the backup copies...

Should a customer have a request, I'm proud to deliver no matter how old a project is.


All times are GMT -5. The time now is 05:04 PM.