# How to use fdbbackup expire command

**URL:** <https://forums.foundationdb.org/t/how-to-use-fdbbackup-expire-command/3250>\
**Category:** Using FoundationDB\
**Tags:** fdbsummit, bindings, operator\
**Created:** [April 6, 2022, 8:25am UTC](https://forums.foundationdb.org/t/how-to-use-fdbbackup-expire-command/3250 "2022-04-06T08:25:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![liyyue](https://avatars.discourse-cdn.com/v4/letter/l/54ee81/32.png) [@liyyue](https://forums.foundationdb.org/u/liyyue)\
**Post date:** [April 6, 2022, 8:25am UTC](https://forums.foundationdb.org/t/how-to-use-fdbbackup-expire-command/3250/1 "2022-04-06T08:25:17Z")

</div>

I am trying the fdbbackup expire command with following steps:

1. Run backup command as following:  
fdbbackup start -z -s 120 -d file:///data/fdbbak/ -t testbak -C /etc/foundationdb/fdb.cluster

2. Check the status of backup process:  
[root@fdbliyyue1 kvranges]# fdbbackup status -t testbak  
The backup on tag `testbak’ is restorable but continuing to file:///data/fdbbak/backup-2022-04-05-06-21-15.479382.  
BackupUID: f89545fd8bab5f0cc3d8e8f24bbc9363  
BackupURL: file:///data/fdbbak/backup-2022-04-05-06-21-15.479382  
Snapshot interval is 120 seconds. Current snapshot progress target is 68.93% (\>100% means the snapshot is supposed to be done)

Details:  
LogBytes written - 382369034  
RangeBytes written - 5828416588  
Last complete log version and timestamp - 7174762457697, 2022/04 /06.02:54:58-0400  
Last complete snapshot version and timestamp - 7174698012972, 2022/04/06.02:53:53-0400  
Current Snapshot start version and timestamp - 7174698119391, 2022/04/06.02:53:54-0400  
Expected snapshot end version and timestamp - 7174818119391, 2022/04/06.02:55:54-0400  
Backup supposed to stop at next snapshot completion - No

1. Try expire command and encounter following error:  
[root@fdbliyyue1 kvranges]# fdbbackup expire -d file:///data/fdbbak/ --expire\_before\_timestamp “2022/04/06.02:54:58-0400”  
ERROR: Requested expiration would be unsafe. Backup would not meet minimum restorability. Use --force to delete data anyway.  
Fatal Error: Cannot expire requested data from backup without violating minimum restorability  
[root@fdbliyyue1 kvranges]# fdbbackup expire -d file:///data/fdbbak/ --expire\_before\_timestamp “2022/04/06.02:54:58-0400” --restorable\_after\_timestamp “2022/04/06.02:55:54-0400”  
ERROR: Requested expiration would be unsafe. Backup would not meet minimum restorability. Use --force to delete data anyway.  
Fatal Error: Cannot expire requested data from backup without violating minimum restorability  
[root@fdbliyyue1 kvranges]#

Anyone can tell me how to use the expire command for fdbbackup? What is the root cause of the error message? Thanks!

And I also found the expire command does not delete any file from disk:  
I have tried to use --expire\_before\_version option, it seems expire command does not delete files from disk:  
…  
[root@fdbliyyue1 kvranges]# du -sm .  
6206 .  
[root@fdbliyyue1 kvranges]# ls -l | wc -l  
745  
[root@fdbliyyue1 kvranges]# fdbbackup expire -d file:///data/fdbbak/ --expire\_before\_version 000007180588091855  
Describing backup…  
All data before version 7180588091855 has been deleted.  
[root@fdbliyyue1 kvranges]# du -sm .  
6206 .  
[root@fdbliyyue1 kvranges]# ls -l | wc -l  
745

Anyone can help me to answer above 2 questions? Thanks!

---

<div class="post-metadata">

**Author:** ![tangerine](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/tangerine/32/1084_2.png) [@tangerine](https://forums.foundationdb.org/u/tangerine)\
**Post date:** [August 14, 2023, 7:52pm UTC](https://forums.foundationdb.org/t/how-to-use-fdbbackup-expire-command/3250/2 "2023-08-14T19:52:01Z")

</div>

I have the same question too, any update on this?
