• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

dar Command Examples in Linux

by admin

dar is a full-featured backup tool, aimed for disks (floppy, CD-R(W), DVD-R(W), zip, jazz, hard disks, usb keys, etc.). The dar (“disk archiver”) command is intended to replace tar by offering more backup and archiving functionality. It is especially useful at creating full, differential, and incremental backups.

dar Command Examples

1. The following command creates a full backup of the mydata directory and outputs a backup file named full.bak:

# dar -R mydata -c full.bak

2. To create a differential backup (diff1.bak), you can reference the full backup using the -A option:

# dar -R mydata -c diff1.bak -A full.bak

3. You can then create more differential backups as needed by referencing the full backup with the -A option. However, to perform incremental backups instead, you need to reference the previous incremental backup, like so:

# dar -R mydata -c incr1.bak -A full.bak
# dar -R mydata -c incr2.bak -A incr1.bak

4. The -x (extract) option is used to recover a backup. If you performed differential backups, you need to first extract the full backup, then the latest differential backup:

# dar -x full.bak
# dar -x diff1.bak -w

5. The -w option automatically overwrites changes to files; otherwise, you will be prompted to confirm. To recover an incremental backup, you need to first extract the full backup, then each incremental backup, in order:

# dar -x full.bak
# dar -x incr1.bak -w
# dar -x incr2.bak -w

Filed Under: Linux

Some more articles you might also be interested in …

  1. blastn Command Examples in Linux
  2. How to configure xhost to be persistent across reboots in Linux
  3. make: Nothing to be done for `default’
  4. fdroid: F-Droid build tool
  5. Linux OS Service ‘network’
  6. uflash: command not found
  7. nmap: command not found
  8. mktemp: command not found
  9. How to Change or Rename a Mount Point in Linux
  10. boltctl: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright