Dino Geek, try to help you

How to do an incremental backup with RSYNC?


Incremental backup is a type of backup that only copies files that have been changed or created since the last backup. Rsync, which stands for “remote sync”, is a remote and local file synchronization tool. As for incremental backups, Rsync is quite commonly used due to its efficiency and the simplicity it provides in creating backups.

To do an incremental backup using Rsync, you should follow the following steps:

1. Install Rsync: If you’re operating on a Unix-based system like Linux or MacOS, Rsync is likely already installed. If not, you can easily install it with a package manager like APT on Ubuntu:
```
sudo apt-get install rsync
```

1. Identify source and destination directories: Before you can create a backup, you need to decide on the arrangement of your source and destination directories. The source directory is where the files you want to back up are currently located, while the destination directory is where you want the backed-up files to go.

1. Run the Rsync command: With the source and destination directories decided, you can now run the command to perform the backup.

```
rsync -av —delete source_directory/ destination_directory/
```

The `a` option tells Rsync to archive the files (which preserves file permissions, timestamps, symbolic links, etc.), the `v` option stands for verbose (which makes Rsync display detailed information about what it’s doing), and the `—delete` option tells Rsync to delete files in the destination directory that no longer exist in the source directory.

Any files in the source directory that have been changed or created since the last backup will be copied over to the destination directory, making this an incremental backup.

Please note that for large backups, it is recommended to run the rsync command within a screen session to prevent the process from interruption if SSH connection is lost.

This is one example of making an incremental backup with Rsync; more complex backups may require additional options or configurations. For example, if the source directory was on a different machine than the destination directory, the rsync command would also require the user and IP address of the remote machine.

Sources used to help construct this response include the official Rsync man page (https://linux.die.net/man/1/rsync) and various Linux command line guides such as the one found on the Ubuntu community help pages (https://help.ubuntu.com/community/rsync).

Remember, doing regular backups is a critical aspect of data management best practices. Using a tool like Rsync simplifies the process and makes sure that your data is safe.


Simply generate articles to optimize your SEO
Simply generate articles to optimize your SEO





DinoGeek offers simple articles on complex technologies

Would you like to be quoted in this article? It's very simple, contact us at dino@eiki.fr

CSS | NodeJS | DNS | DMARC | MAPI | NNTP | htaccess | PHP | HTTPS | Drupal | WEB3 | LLM | Wordpress | TLD | Domain name | IMAP | TCP | NFT | MariaDB | FTP | Zigbee | NMAP | SNMP | SEO | E-Mail | LXC | HTTP | MangoDB | SFTP | RAG | SSH | HTML | ChatGPT API | OSPF | JavaScript | Docker | OpenVZ | ChatGPT | VPS | ZIMBRA | SPF | UDP | Joomla | IPV6 | BGP | Django | Reactjs | DKIM | VMWare | RSYNC | Python | TFTP | Webdav | FAAS | Apache | IPV4 | LDAP | POP3 | SMTP

| Whispers of love (API) | Déclaration d'Amour |






Legal Notice / General Conditions of Use