backup

  • ratnaps
    #!/bin/sh
    
    # Set up archive name
    computer=$(uname -n)
    now=$(date +%Y%m%d)
    name=${computer}-${now}
    #dirs="$@"
    
    # Create an archive
    /usr/bin/tarsnap -c \
        -f "${name}" \
        /etc /home /var /...
        #"${dirs}"
  • add to cron

list

tarsnap --list-archives | sort

extract

  • extracts full path so genrally start from /
    tarsnap -x -f <archive_name>