Skip to content

Instantly share code, notes, and snippets.

@captn3m0
Created September 2, 2012 22:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save captn3m0/3605164 to your computer and use it in GitHub Desktop.
Save captn3m0/3605164 to your computer and use it in GitHub Desktop.
My Backup Plan

This is the backup plan I'm using for my newly-won 1 TB HDD (Thanks Yahoo!).

Partitions

On the Internal HDD (320GB)

  • 50GB / (primary OS) (ext4)
  • 220 GB /home (ext4)
  • Extended Partition
    • 30 GB (Windows) (NTFS)
    • 10 GB (Secondary OS) (ext4/btrfs)
    • 5 GB (swap)

On External HDD (1TB)

  • 800 GB UDF (Backs Up Most Media one way)
  • 120 GB ext4 (/home Backup) - Encrypted FS - Backs up non-media everything in /home
  • 10 GB ext4 (/ alternative OS that uses above /home to boot)
  • 931 GB is total usable space in the hdd

Media Backup

  • ~/Music to Music
  • ~/Movies to Movies
  • ~/Videos to Videos
  • ~/TV to TV
  • ~/Books to Books
  • ~/Pictures to Pictures
  • ~/Downloads to Downloads (Try not to keep sensitive stuff here)
  • ~/Setups to Setups
  • ~/VirtualDisks to ISOs
  • ~/VMs to VMs
  • /home to /home (ignoring the above folders)

Time-Duration

  • Perform /home backup by watch & try to use two-way sync LIVE
  • Perform Media backups on a daily basis on one-way sync.
  • Use specific things for particular backups (for eg use compression & weekly backup for VMs/Setups)

Also Consider:

  • Try to create a raw VMDK file to access the Windows System inside VirtualBox
  • Use etckeeper to keep a history of /etc
  • Use the same OS on hdd & primary OS (if possible)
  • Backup home folder from Windows (possibly within Windows)

Advantages

  • Backups are regularly made of all Media
  • You can go and delete stuff in all Media folders that is older than 7 days easily.
  • Media is auto-backed up, and deletes are not synced over.
  • HDD becomes a one-way dump, which can be cleaned up if space is needed
  • Sensitive Stuff in /home directory is encrypted to encyrptfs
  • The Internal HDD always has the latest stuff, while HDD keeps "older" stuff that I do not need urgently.
  • You can always copy back stuff for temporary conditions where you don't carry hdd.
  • UDF Means that the disc is writeable almost everywhere (Windows XP)
  • UDF allows you to sync file ownership+permissions (POSIX compatible)
  • A live OS install in hdd means you can do stuff within that as well.
  • The live OS is using the latest synced /home, so I can "just work" without much hassles from any system.
  • Tries to follow the 3-2-1 Backup Rule for important files

Off-site Backup

  • Figure out a way to image the /home on Amazon Glacier/External Backup Service
  • Basically, unmount /home from hdd, and image+compress it before backing up.
  • Weekly/Monthly backups should be fine.
  • Can backup Media occasionally on the other computer.

#Formatting Procedure Formatting an external hdd to udf is tricky, and it required a mix of Windows & Ubuntu to make it work cross-os. Basically Windows requires the Partition Type to be FAT16 for it to work. The instructions at this answer on askubuntu seem to work very well for me. Although the disk does not auto-mount in Windows for me (I have to mount it to a drive/letter using Disk Management in Windows 7). That is surely, a small price to pay for dealing with Windows. On another point, Windows is also facing encoding issues with some filenames (which contain restricted Windows characters for files, such as ?).

This is what the final formatted drive looks like:

Screenshot of drive specs

Unfortunately, getting the disk to work in Windows with udf was impossible, so I had to reformat it in NTFS.

sudo fdisk -l
Disk /dev/sdc: 1000.2 GB, 1000204883968 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525164 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c02f8

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  1680031743   840014848    6  FAT16
/dev/sdc2      1680033792  1931100159   125533184   83  Linux
/dev/sdc3      1931100160  1953523711    11211776   83  Linux

#Setting Up The Backup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment