Backup solution to NAS

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
waer01
Level 1
Level 1
Posts: 5
Joined: Wed Feb 17, 2016 6:55 pm

Backup solution to NAS

Post by waer01 » Mon Jan 14, 2019 6:04 am

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?

User avatar
AndyMH
Level 6
Level 6
Posts: 1427
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Backup solution to NAS

Post by AndyMH » Mon Jan 14, 2019 8:23 am

Are you asking about backing up your NAS or a local PC?
Homebrew i5-8400+GTX1080 Cinnamon 19.0, Thinkpad T430 i7-3632 Cinnamon 19.0, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

waer01
Level 1
Level 1
Posts: 5
Joined: Wed Feb 17, 2016 6:55 pm

Re: Backup solution to NAS

Post by waer01 » Mon Jan 14, 2019 9:32 am

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 6
Level 6
Posts: 1427
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Backup solution to NAS

Post by AndyMH » Mon Jan 14, 2019 11:22 am

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.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, Thinkpad T430 i7-3632 Cinnamon 19.0, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

PJO3
Level 1
Level 1
Posts: 26
Joined: Sat Nov 19, 2016 8:24 am

Re: Backup solution to NAS

Post by PJO3 » Mon Jan 14, 2019 2:16 pm

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 6
Level 6
Posts: 1427
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Backup solution to NAS

Post by AndyMH » Mon Jan 14, 2019 5:32 pm

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.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, Thinkpad T430 i7-3632 Cinnamon 19.0, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

Post Reply

Return to “Software & Applications”