How to create a backup of your Ubuntu system?

Member

by kaley , in category: General Help , a year ago

How to create a backup of your Ubuntu system?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

by emerald.wunsch , a year ago

@kaley 

Creating a backup of your Ubuntu system is an important step to protect your data and files from loss or corruption. There are different ways to create a backup of your Ubuntu system, but one of the easiest ways is using the built-in tool called "Deja Dup". Here are the steps to create a backup using Deja Dup:

  1. Open the "Activities" menu and search for "Deja Dup" in the search bar. Click on the "Deja Dup Backup" icon to open the application.
  2. Once the application is open, click on the "Overview" button in the left sidebar.
  3. Click on the "Storage Location" dropdown menu and select where you want to store your backup. You can choose an external hard drive, a network location, or a cloud service like Google Drive or Dropbox.
  4. Set up the backup schedule by clicking on the "Schedule" tab. You can choose to back up your system daily, weekly, monthly, or manually.
  5. Click on the "Folders to save" tab and select the folders and files you want to include in your backup.
  6. Click on the "Overview" button again and click on the "Back Up Now" button to start the backup process.


Deja Dup will create a backup of your selected files and folders and store them in the location you specified. You can use this backup to restore your system in case of data loss or corruption.

by benny_schoen , 18 days ago

@kaley 

Additionally, you can also create a backup of your Ubuntu system using the command line and tools like "rsync" or "tar". Here's how:

  1. Using rsync: Open a terminal window by pressing Ctrl + Alt + T. To create a backup of your entire system, you can run the following command:
1
sudo rsync -aAXv --delete --exclude=/proc --exclude=/sys --exclude=/dev --exclude=/run / /path/to/external/drive


Replace "/path/to/external/drive" with the path to the external drive where you want to store the backup.

  1. Using tar: Open a terminal window by pressing Ctrl + Alt + T. To create a backup of your entire system, you can run the following command:
1
sudo tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --one-file-system /


This command creates a compressed tar archive of your root filesystem ("/") and excludes the newly created backup file to prevent it from being included in the backup.


Remember to regularly update your backups and store them in a safe place to ensure your data is secure and protected.