1

My old NAS crashed and I don't want to use a Hardware RAID controller any more so I created my first server with Ubuntu Server 14.04 LTS. It's running on a SSD and stores my data on 2×3TB WD Red running in RAID1.

Everything is running fine so far, but I want to create a Backup script to manually mirror from the RAID1 to a third 3TB drive. This third drive won't be available all the time, hence the need for this to be manually run.

In Windows, I've done similar things with an application called RoboCopy. it has a /mir option to do a 1:1 copy. That's what I'm aiming to do here, under Ubuntu.

I've been reading the Help for rsync but I'm not sure I've found what I'm looking for yet. I've found a load of options but don't know whether they fit together. Is does the following look right? Are there better ways?

sudo rsync --delete -avv /data /backup

/data and /backup are for my paths

I'm open to tips or alternatives to do the backup.

And does anyone know if my mechanical disks will spin down by default on Ubuntu Server 14.04? I don't want them to spin down so if that's the default, how can I stop it?

1

Yes, that covers the basics. My backup scripts are only slightly fancier:

logger -i -t Backup Backup started
date > /path/backuplog
rsync -az --progress --safe-links --exclude-from=/path/backup-exclude /data /backup >> /path/backuplog 2>>&1
date >> /path/backuplog
logger -i -t Backup Backup finished
  1. I use the logger utility to write lines to syslog.
  2. I keep a backup log file storing times and dates.
  3. I use the z flag for compression, and the --progress option (although the latter doesn't log anything).
  4. I use the --safe-links option to ignore links outside the folder.
  5. I use exclude patterns.

I should add that this usage of rsync does not create an exact mirror (it does not delete files in the backup). Yours does. Nor does it do a two-way sync (neither does yours, and I don't think it should).

0

Thanks for the help,

but now i've got more questions about the options you mentioned.

  1. the logger writes to syslog, but where i found the syslog? and what is written there from the script?

  2. you said you keep a backup log containing times and dated, but which dates you meant, the dates of the backup or the files?

  3. what does --progress so? i didn't found it in the German Help version. Ubuntu Wiki

  4. does --safe-links ignore every link / shortcut or copy the file from the link? also not mentioned in the German help...

0

And does anyone know if my mechanical disks will spin down by default on Ubuntu Server 14.04? I don't want them to spin down so if that's the default, how can I stop it?

For those of you how are searching for the same Problem, i observed my system the last days and it seems that the disks aren't spinned down. But i can't say if its the default state of the Ubuntu Server 14.04 version or just because WD REDs have some special WD power management which ignores system commands.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.