0

I have a laptop with Windows 10 and Ubuntu 14.04. I would like a quick process to perform nightly backups of the entire hard drive. The ideal scenario would be to plug laptop into a hard drive, boot from either the laptop or hard drive, and run an application which backs-up all changes since the last backup.

4 Answers4

0

A good option might be the built-in backup utility, Deja-Dup. You will have to do a little configuring to make sure all the folders you care about are included, but it provides a straightforward GUI to do so. Once you are set up, it will do a full backup. It will then do incremental backups whenever you like. Every 90 days or so it will do another full backup.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • This would handle Ubuntu files well, but does it handle files on multiple partitons? I suspect that what I'm looking for is more like cloning a hard drive than backing up a directory. – Daniel Arnett May 19 '16 at 18:50
0

I personally use Grsync, which is a GUI wrapper on rsync, to backup my D: drive. You could create a backup rule for each partition and script them to run nightly.

wjandrea
  • 14,236
  • 4
  • 48
  • 98
0

To do multiple partition backup, you can use:

Clonezilla. Its very reliable and stable.

Also you can use Bacula.

Bacula is a set of computer programs that permit managing backup, recovery, and verification of computer data across a network of computers of different kinds. Based on Source Forge downloads, Bacula is the most popular Open Source backup program.Bacula

Mitch
  • 107,631
0

You have several options. Considering the disk for storing backup is of same size (or larger) as the source disk and is mounted, then you can use the following tools in the form on a script which runs periodically using cron. Advantage to such cloning for backup is that, if your source hard-drive fails you can simply use the backup drive and it will retain all partitions as such.

  1. Using dd from terminal or script

This is used to make a copy/duplicate of the whole disk (meaning full physical disk including partitions).

Pro: It is optimized for such cloning purpose. User can specify block size, and other parameters. Cons: It is slow and the speed optimization needs trying out different block sizes. Also, blank space is also copied.

dd if=<input_disk> of=<backup_disk or file> bs=2048

For example, input disk= /dev/sdx & output disk = /dev/sdy or . Use lsblk in terminal to get the device id. Above example does not show the progress bar. You can use pv in conjunction with dd to get progress bar. This is available here Progress bar in dd

Like ,

sudo dd if=/dev/sdx | pv -s 2G | dd of=/dev/sdy bs=4096

Explanation: pv will check for time and transfer after every 2 Gb of data moved and report. (You need to install pv before using the above mentioned command.)


*A bash shell script using dd with backup file check and logging option is available here (The user needs to edit the backup file path, and source drive ID to use it. It can be set as cron job. )

Restoring from such a backup image is by following command where of=new_disk,

dd if=/path/to/backup.img of=/dev/sdn


  1. Using pv from terminal or script Makes duplicate of whole disk including partitions. This is faster then dd and uses maximum possible throughput available to the disks.

After installation using sudo apt-get install pv you can simply run as,

sudo pv < /dev/sdx > /dev/sdy

This will clone the disk /dev/sdx to /dev/sdy

PS- It is suggested that you run some command with sudo in the terminal before running this, since it will ask for permission. Also, this does not show progress, and the terminal will be busy for a while depending how big the backup is.


*A bash script using pv to make backup image is available here. User needs to edit the backup file path. Use cronjob to set it up for periodic run. Use crontab -e to run as root.

Restoring from such a backup image is by following command where /dev/sdn is the new disk,

pv < /path/to/backup.img > /dev/sdn


Another option is Clonezilla (mentioned by @Mitch)

ankit7540
  • 4,185
  • I suggest editing above to add details about Clonezilla if possible. – ankit7540 May 21 '16 at 07:46
  • @Daniel Arnett : If you need a script I can write one for doing full disk clone using either dd or pv. – ankit7540 May 21 '16 at 07:47
  • Awesome, well they both look like they'll do the trick. Even though I'm booting from the hard drive that's being backed up I'll still be able to read and copy every bit from the disk? Also I want to minimize read/writes between disks so I don't harm either drive with nightly full-disk operations. Finally could I have multiple backups on one large external drive? – Daniel Arnett May 21 '16 at 13:18
  • First question: Yes it is possible. It is recommended not to work with files and update apps while doing this. Second question: yes, also possible. We can make image of the hard-drive and store it and multiple such images can be maintained. I'll write a small script and post later with the answer. – ankit7540 May 21 '16 at 16:31
  • I have added two scripts ( using dd and pv) to make backup file as backup_date.img . Restoring from this backup is also simple. If you have any problem in deploying the script feel free to ask. – ankit7540 May 23 '16 at 06:03
  • Excellent, thank you @ankit7540 and to everyone in this thread for helping a lowly +3 user in AskUbuntu. I'll buy a hard drive this week to test this. – Daniel Arnett May 23 '16 at 11:04