Backup solution to NAS

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
waer01

Backup solution to NAS

Post by waer01 »

Hello,

I have Qnap network attached storage. Already set-up a snapshot within Linux Mint which is great to roll back to previous backups. But in case if HDD fails would like to have some external backups.

Please advise what backup solutions do you use to backup to external media?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
AndyMH
Level 21
Level 21
Posts: 13578
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Backup solution to NAS

Post by AndyMH »

Are you asking about backing up your NAS or a local PC?
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
waer01

Re: Backup solution to NAS

Post by waer01 »

Sorry I was not clear. I am asking to backup Linux Mint from my laptop to NAS. I was looking at these tools. Anyone tried any of these? : https://www.tecmint.com/linux-system-backup-tools/
User avatar
AndyMH
Level 21
Level 21
Posts: 13578
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Backup solution to NAS

Post by AndyMH »

I backup to local drives and occasionally copy to my synology NAS. Locally I use backintime to backup /home. It does support SSH so should be able to backup to your NAS. The options on backintime enable you to backup whatever you like (you can include /). You can also set automated backups (think it uses anacron, not cron) so that it is not dependent on a specific time/date (if your PC is not on when it wants to backup, it will do it when you switch on).

I use timeshift to backup /, but it insists on a linux format drive, e.g. ext4, and only shows local drives as options, so don't think that will work.

You certainly can use rsync and a lot of the backup tools are front-ends for rsync. Terminal only and you will have to write your own scripts, which I've done in the past.

So my recommendation would be look at backintime (can be installed from sw mgr), there will be others here with experience of other tools and will offer their opinions.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
PJO3

Re: Backup solution to NAS

Post by PJO3 »

I use TimeShift to back up to an external HD on my desk (an internal backup is useless if it's on the same drive), plus
  • Backintime to my NAS
  • BorgBackup also to my external drive

I can't backup my NAS to the cloud as I have very limited bandwidth (384k up) so I backup my NAS to a 2nd one with rsync every night.

Borg is similar to restic, which is included in the article (they're very similar, with restic supporting more cloud options). The reviews in the article are very superficial and these roundups often include software that is out of date. I wouldn't rely on any such article. If you short list something -- and I recommend using TWO different backup solutions -- then make sure to read up on it and try it out, including trying a recovery.

Borg is a block level deduplicating program which will save you massive amounts of space on your NAS, particularly if you backup more than one machine to the same repository. You just need a script such as the one I've appended once you've initialized the repo. Just change user and DATA for your username and volume label and run with sudo bash borg.sh.

BTW there's no need to use SSH when backing up to your NAS when you're on your own LAN unless you suspect someone on it is intercepting your traffic. It will just slow things down.

borg.sh

Code: Select all

#!/bin/sh
REPOSITORY=/media/<user>/DATA/borg
TAG=daily

# Backup
# except exclude directories
borg create -v --stats                          \
  $REPOSITORY::$TAG'-{hostname}-{now:%Y-%m-%d}' \
  /home                                         \
  /var/www                                      \
  /etc                                          \
  /opt                                          \
  /root                                         \
  --exclude '/home/*/.cache'                    \
  --exclude '/home/*/.gvfs'                     \
  --exclude '/home/*/.trash'                    \
  --exclude '/home/*/.thumbnails                \
  --exclude '/home/*/*.backup

# Prune to maintain 7 daily, 4 weekly and 12 monthly archives of this machine.
#
# The 'daily-' prefix is very important to limit prune's operation to this 
# machine's archives and not apply to other machine's archives also.
#
borg prune -v --list $REPOSITORY --prefix $TAG'-' \
    --keep-daily=7 --keep-weekly=4 --keep-monthly=12
User avatar
AndyMH
Level 21
Level 21
Posts: 13578
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Backup solution to NAS

Post by AndyMH »

BTW there's no need to use SSH when backing up to your NAS when you're on your own LAN unless you suspect someone on it is intercepting your traffic. It will just slow things down.
Agreed :D I've got my synology mounted under /media so I could backup via that route if I wanted. Another choice for the OP.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Locked

Return to “Software & Applications”