Bobcares

Backup and Restore using Deja Dup

by | Nov 28, 2023

Learn more about Backup and Restore using Deja Dup. Our Server Management Support team is here to help you with your questions and concerns.

Backup and Restore using Deja Dup

Deja Dup is a popular and powerful backup tool for Linux operating systems. It offers a simple way to backup and restore data from the graphical interface.

Deja Dup relies on duplicity to compress and encrypt the backup data with a password. By default, Deja Dup takes a full backup every 3 months and then deletes old backups after a specific period of time. It lets us save the backup on the local directory or a remote directory like Google Drive, NFS, SSH, and Samba.

Furthermore, we can set which folders to backup and which folders can be ignored during backup.

Additionally, Deja Dup supports automatic and scheduled backups. In other words, we can create daily and weekly backups. It relies on a built-in program called deja-dup-monitor that carries out scheduled backups.

Our experts would like to point out that the backup does not start if the user is not logged in. This is considered a disadvantage by some.

Here is a short look at some of the features of Deja Dup:

  • By default, Déjà Dup takes a new full backup every 3 months.
  • It lets us delete old backups after a certain period of time.
  • We can set a backup retention period for 3 months, 6 months, or a year. Furthermore, it keeps the backups forever by default.

    However, the oldest backups will be deleted earlier if the backup location is running out of space.

  • As Deja Dup uses duplicity, we can compress and encrypt the backup data with a password. When we want to restore the data, all we have to do is enter the correct password. Additionally, duplicity uses gpg with a symmetric cipher for encryption.

Here is an overview:

How to install Deja Dup in Linux

Deja dup is available in all the official repositories of Linux distributions. The version differs between different distributions.

We can install Deja Dup as seen here:

  • On Alpine Linux:

    $ sudo apk add deja-dup

  • On Arch Linux & its variants like Manjaro Linux and EndeavourOS:

    $ sudo pacman -S deja-dup

  • On Fedora, RHEL, CentOS, AlmaLinux, Rocky Linux:

    $ sudo dnf install deja-dup

  • On Debian, Ubuntu, Linux Mint, and Pop OS:

    $ sudo apt install deja-dup

  • On openSUSE:

    $ sudo zypper install deja-dup

We can find the latest version of Deja Dup on either snap store or flathub.

  • From Snap:

    $ sudo snap install deja-dup –classic

  • From flathub:

    $ flatpak install flathub org.gnome.DejaDup
    $ flatpak run org.gnome.DejaDup

Create the First Backup in Deja Dup

Deja Dup is simple and straightforward to use. We can reduce the complexity of backing up files with these steps:

  1. First, launch Deja Dup.
  2. Then, choose the “Create My First Backup” option.

    Backup & Restore Files using Deja Dup in Linux

  3. Now, we have to choose which directory we want to back up and which one to exclude as seen in the image below:

    choose which directory

  4. Once we enter the directories, we have to click the Forward button.
  5. Then, we have to choose the storage location for our new backup. Once we choose the location we have to click Forward.
  6. At this point, we will be prompted to set a password for the backup. Although this is optional, our experts recommend setting a password to secure the backup.

    By setting a password, the backup is encrypted with gpg and symmetric ciphers at the backend.

  7. Now the backup process will start. The time taken will depend on the size of the data.

How to Schedule Backup with Deja Dup

Did you know that every backup utility lets us perform automatic incremental backups with the cron job? It is usually set Daily, Weekly, Monthly, and Yearly schedules.

However, Deja Dup uses a different approach. It schedules regular backups at different intervals with a built-in program called “deja-dup-monitor”.

We can use this command to check the status of the deja-dup-monitor program:

$ ps -ef | grep -i deja-dup-monitor

Here is a sample output of this command:

ostechnix 2334 1975 0 11:39 ? 00:00:00 /usr/libexec/deja-dup/deja-dup-monitor
ostechnix 3796 3532 0 12:00 pts/0 00:00:00 grep –color=auto -i deja-dup-monitor

  1. We can enable automatic backups in Deja Dup by toggling the slider. This slider can be found in the Overview section. We will find two backup schedules available, namely, Daily and Weekly.
  2. Then, schedule a backup by clicking the 3 vertical bars on the menu bar and then clicking Preferences.
  3. Now, we can set the backup schedule of our choice in the Automatic Backup Frequency drop-down box.
  4. At this point, Deja Dup will automatically back up the data as per the setting we have chosen.

Our experts would like to point out that Deja Dup carries out the backup process only when the user is logged in.

How to Restore Files from Backup with Deja Dup

Just like creating a backup file with Deja Dup is easy, restoring data from the backup is also a simple process. Deja Dup incrementally takes backups and lets us restore from any particular backup at any time.

In fact, we can restore individual folders, files, or even the entire backup.

  1. First, launch the Deja Dup from the Application Menu or Dash or Application Menu.
  2. Then, choose the “Restore From a Previous Backup” option.
  3. Now, we will be presented with a list of available backup files.
  4. then, choose the file or folder we want to restore from and click the Restore button on the bottom left corner. Additionally, if there are multiple backup copies we can choose from which date to restore the copy.

One of the notable strengths of Deja Dup is its versatility in backup storage options. Users can choose between local directories and various remote locations, including popular cloud services such as Google Drive. This flexibility ensures that users can tailor their backup strategy to meet their specific needs and preferences.

The ability to set custom backup schedules, including daily and weekly options, adds another layer of convenience. Deja Dup’s integration with the duplicity backend allows for compression and encryption of backup data, providing an added layer of security. The encryption process, which uses gpg with a symmetric cipher, ensures that sensitive information remains protected.

However, it’s important to note a significant limitation of Deja Dup—the backup process only initiates when a user is logged in. This limitation may pose challenges for users who require continuous, unattended backups.

Despite this drawback, the automatic, scheduled backups offered by Deja Dup through the deja-dup-monitor program enhance the overall efficiency of the backup process.

In Brief:

In conclusion, Deja Dup is a reliable and user-friendly backup tool for Linux operating systems. Its simplicity and powerful features make it a valuable asset for users looking for an efficient data protection solution.

The backup retention and deletion features add a layer of customization to the user experience. Users can choose to retain backups for a specific period, ensuring that older backups are either kept for a longer duration or deleted to free up storage space. This flexibility allows users to balance the need for historical backups with storage constraints.

Installation of Deja Dup is straightforward on various Linux distributions, thanks to its availability in official repositories. Users can easily install the application using package managers specific to their distributions. Additionally, for those seeking the latest version, Deja Dup can be obtained from Snap or Flatpak repositories.

Deja Dup’s incremental backup approach ensures that the backup times are reasonable, even for large datasets. The ability to restore individual files or entire backups further contributes to its user-friendly design. Users can easily navigate the restoration process, selecting specific files or folders and choosing from multiple backup copies based on date.

In summary, Deja Dup serves as an effective solution for backing up specific files or directories on Linux systems. While it may not be suitable for comprehensive system backups, its ease of use, robust features, and integration with various storage options make it a valuable tool in the Linux ecosystem. Whether for personal use or within a larger organizational context, Deja Dup provides a reliable and accessible means of safeguarding critical data on Linux systems.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

In brief, our Support Experts introduced us to Backup and Restore using Deja Dup.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.