Hacker News new | ask | show | jobs
by simonblack 2252 days ago
I back up my /home and system partitions daily. I back up my long-term archive partitions daily.

/home partition: Straight-out cpio backup in full (around 9-10 gigs). The /home partition is restricted to work-in-progress directories and personal documents. I break that large cpio file into 2000MB chunks so that they can be transferred on any USB thumb-drive.

There is no need to hold anything else in the /home partition. Anything you keep 'for later' goes straight to an archive partition.(Photos, music, videos, software, ebooks,etc.)

Archive directories/partition(s): plain old rsync. The first time you do this, it will take hours. Subsequent rsync backups take only a few minutes for (say) 8TB of archives because you make very few changes to an archive partition on a daily basis.

System partition: This is where you get sneaky. Only backup the important information, such as:

  The /etc directory which holds all of your configuration stuff for your apps.

  A list of the installed software packages.

  mysql databases.

  crontabs, .bashrc files.

  website.

  /usr/local directory.

  EFI boot partition.
The thing with the system backup is that you only keep the stuff that will allow you to completely rebuild the system in the case of a disaster. You can re-install the distro and then rebuild the system to your specifications in less than two hours if need be. That is only about 2-3 gigs of backup space rather than (say) 20 gigs.

Here is the 'ls' and 'du' output of my last night's non-archive backup. Total 12 gigs. 'centrepoint' is the machine's name.

    [jvs] /x/BAK/2858-200420 > ls
    
    apache2_valid_200316.tgz        jvs.centrepoint.200420.cpio-d   partition_tables.centrepoint.200420
    backup.time.centrepoint.200420  jvs.centrepoint.200420.cpio-e   root_bashrc.centrepoint.200420
    debian.pkgs.centrepoint.200420  jvs_crontab.centrepoint.200420  root_crontab.centrepoint.200420
    etc.centrepoint.200420.cpio     letsencrypt_valid_200316.tgz    sda2-EFI.centrepoint.200420.img
    git.200420.cpio                 Linux_Mint_19.3_Tricia          uname-a.centrepoint.200420
    jvs.centrepoint.200420.cpio-a   local.centrepoint.200420.cpio   www.centrepoint.200420.cpio
    jvs.centrepoint.200420.cpio-b   mysql.centrepoint.200420.sql
    jvs.centrepoint.200420.cpio-c   new-system-etc-copy
    
    [jvs] /x/BAK/2858-200420 > du -hs .
    12G     .