# Few questions regarding full and incremental backups/storage

**URL:** <https://forums.percona.com/t/few-questions-regarding-full-and-incremental-backups-storage/28745>\
**Category:** Percona XtraBackup\
**Created:** [February 27, 2024, 12:37am UTC](https://forums.percona.com/t/few-questions-regarding-full-and-incremental-backups-storage/28745 "2024-02-27T00:37:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alturic](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@alturic](https://forums.percona.com/u/alturic)\
**Post date:** [February 27, 2024, 12:37am UTC](https://forums.percona.com/t/few-questions-regarding-full-and-incremental-backups-storage/28745/1 "2024-02-27T00:37:56Z")

</div>

Hi all, few questions regarding XtraBackup.

1. I _think_(?) I read that when doing full backups I can stream the files to S3?
2. When doing incremental backups, do I need to have the base dir locally available?
3. What is the purpose of `--prepare` as it reads as though I can pass `--prepare` into the backup routine?

---

<div class="post-metadata">

**Author:** ![Mauricio\_Cacho](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mauricio_cacho/32/5859_2.png) [@Mauricio\_Cacho](https://forums.percona.com/u/Mauricio_Cacho)\
**Post date:** [February 27, 2024, 2:22am UTC](https://forums.percona.com/t/few-questions-regarding-full-and-incremental-backups-storage/28745/2 "2024-02-27T02:22:31Z")

</div>

Hi @alturic

> 1. I _think_(?) I read that when doing full backups I can stream the files to S3?

That’s right, please refer to: [Use the xbcloud binary with Amazon S3](https://docs.percona.com/percona-xtrabackup/8.0/xbcloud-s3.html#create-a-full-backup-with-amazon-s3)

> 1. When doing incremental backups, do I need to have the base dir locally available?

**Edit:** It’s not required, the only information required for creating incremental backups is the LSN of the previous full, or previous incremental.  
You can pass that information using `--incremental-lsn=LSN` ([Docs](https://docs.percona.com/percona-xtrabackup/8.0/xtrabackup-option-reference.html#incremental-lsn)) . You can retrieve that info from the `xtrabackup_checkpoints` file on the previous backup.

Also, XtraBackup has a feature that allows you to store backup LSN history on the mysql server itself, and create incrementals using that information. Please refer to this [section](https://docs.percona.com/percona-xtrabackup/8.0/store-backup-history.html).

> 1. What is the purpose of `--prepare` as it reads as though I can pass `--prepare` into the backup routine?

I’m not sure I understood this last question, but if you’re working with incremental backups you **should** use the --apply-log-only for each incremental, as using only --prepare will make the next incremental backups useless.  
Refer to this [section](https://docs.percona.com/percona-xtrabackup/8.0/prepare-incremental-backup.html) for more details about that.

Best,  
Mauricio.

---

<div class="post-metadata">

**Author:** ![alturic](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@alturic](https://forums.percona.com/u/alturic)\
**Post date:** [February 27, 2024, 2:41am UTC](https://forums.percona.com/t/few-questions-regarding-full-and-incremental-backups-storage/28745/3 "2024-02-27T02:41:06Z")

</div>

@Mauricio_Cacho So there is no way to perform incremental backups without having, ultimately, a duplicate amount of storage space available to retain the last full backup?

Is that not what `--extra-lsn` and/or `--incremental-lsn` would “solve”, not needing to have the full backup directory?

---

<div class="post-metadata">

**Author:** ![Mughees\_Ahmed](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mughees_ahmed/32/9028_2.png) [@Mughees\_Ahmed](https://forums.percona.com/u/Mughees_Ahmed)\
**Post date:** [February 27, 2024, 3:15am UTC](https://forums.percona.com/t/few-questions-regarding-full-and-incremental-backups-storage/28745/4 "2024-02-27T03:15:43Z")

</div>

well, incremental backup the files that have changed since the previous incremental or full backup. So you need full backup space and then need space for incremental, let say you want to take weekly full and then rest incrementally through the week, so you need to a good the space, as you need to keep the full backup as well. But it better test it and check how much full backup takes and how much space is required for incremental backup

---

<div class="post-metadata">

**Author:** ![alturic](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@alturic](https://forums.percona.com/u/alturic)\
**Post date:** [February 27, 2024, 3:49am UTC](https://forums.percona.com/t/few-questions-regarding-full-and-incremental-backups-storage/28745/5 "2024-02-27T03:49:04Z")

</div>

Interesting. I guess in my case I’ll just do full backups daily so I can move the files off-server and not have to have duplicate the amount of disk required.

I really just want to be 100% clear. Our database is roughly 10TB. If I wanted to do a full backup weekly (then store it to AWS), and incremental backups daily (also storing to AWS), I would need to have a _minimum_ of 20 TB of disk space, realistically? I know there’s compression options and such, but if we were talking straight backups, no compression. Just want to be clear as it seems crazy to need to have double the disk space just to have the full backup ‘sit there’.

---

<div class="post-metadata">

**Author:** ![Mauricio\_Cacho](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mauricio_cacho/32/5859_2.png) [@Mauricio\_Cacho](https://forums.percona.com/u/Mauricio_Cacho)\
**Post date:** [February 28, 2024, 1:47am UTC](https://forums.percona.com/t/few-questions-regarding-full-and-incremental-backups-storage/28745/6 "2024-02-28T01:47:40Z")

</div>

Hi @alturic .

I’ve edited my firs answer, please check the answer to the second question, as it has some great news for your requirement.

I’m sorry for my previous answer stating it was required to have the full backup.

Feel free to let us know if you still have questions after checking the documents shared in there as well.

Best,  
Mauricio.
