how to backup to external USB hard drive

mactsk

Dabbler
Joined
Sep 12, 2012
Messages
24
Hi!
i need to set up a timed backup (weekly) on an external drive, so to prevent data loss in case of theft or other problems, i tried to find how to reliably mount and check if an external hdd is available, and then dismount(export?) it, but i'm not very skilled with command line, the external drive can be ntfs or zfs, probably zfs i think is better, and in case of need i am able to set up a vm to recover the files.

can anyone help?
(i don't need to backup the whole nas, only some critical folders, so one hdd or even a usb key is ok)

Thanx!
 
Joined
Jul 5, 2016
Messages
1
I have been searching the same topic and found nothing. Anyway, I found a way to do it - as follows:
The solution is "Cron Jobs"
First you have to isolate a HD for your backups - I used an external hot swap doc, but any drive isolated from any of your system RAIDs

upload_2016-7-25_14-51-56.png


The following command line will sync all the data on "Mathews1" with "ServerBackup"
Mathews1 = SOURCE
ServerBackup = TARGET

All the data on source is replicated on target
The following command will accomplish this

rsync -zvr /mnt/Mathews1/Primary /mnt/ServerBackup/Backup --delete-after

The last part "--delete-after" will delete any files on TARGET that are no longer on SOURCE.

The following configuration of Cron Job runs this script every night at 11PM

upload_2016-7-25_15-2-29.png


upload_2016-7-25_15-2-55.png


THAT's ALL THERE IS TO IT - WORKS LIKE A CHAMP

I hope this helps.
 

Mark WatIng

Explorer
Joined
Mar 6, 2017
Messages
53
hi just seen this and running now - thanks for the post!
 

sabi-tech

Dabbler
Joined
Jan 19, 2012
Messages
45
Raising the dead but this was the most helpful, sadly it didnt work for me. no data being written.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
@sabi-tech, I wrote a forum resource on manual local disk backups. Whence you have it working manually, you can then see about automating the process. Here is a link;

How to: Backup to local disks

This was not intended as a copy and paste procedure. Each person's backup requirements are different. So it's more of an example.
 
Top