# How to restore from incremental backup?



## ahgu (Aug 10, 2015)

For example,
Monday level 0
Tuesday level 1
....       
Sunday Level 6

I need to restore after level 6, do I need to store individually? level 0 first and then 1,2,3,4,5,6?

thank you
ahgu

How do I restore from incremental backup?
Do I need to restore 0 first, then 1, then 2?


----------



## tetragir (Aug 10, 2015)

Hi,

Welcome to the forums. Unfortunately you missed out a few important parts from your question. Could you please clarify the following? These help us understand better ypour problem and also you get an answer much sooner if you include all relevant information.
- What is the program you are using for backup?
- Exactly what version of FreeBSD are you using?
- Is this an issue right now, or you are looking for a solution to fulfill the requirements?
Also next time please place your post to a relevant category, rather then off-topic.


----------



## DutchDaemon (Aug 10, 2015)

It was actually moved here from the "HowTos and FAQs" forum (where it was posted twice) because I had no idea either..


----------



## SirDice (Aug 10, 2015)

From restore(8):

```
The restore utility performs the inverse function of dump(8).  A full
     backup of a file system may be restored and subsequent incremental back-
     ups layered on top of it.
```

So, full first, then incremental 1, incremental 2, etc.


----------



## ahgu (Aug 10, 2015)

I want to create a backup script and don't quite understand how to recover from the incremental. 
The question is do I recover the 0 first and then 1, then 2, 3,4,5?

Or is restore smart enough to know the 0 if I just restore the 5?





tetragir said:


> Hi,
> 
> Welcome to the forums. Unfortunately you missed out a few important parts from your question. Could you please clarify the following? These help us understand better ypour problem and also you get an answer much sooner if you include all relevant information.
> - What is the program you are using for backup?
> ...


----------



## wblock@ (Aug 10, 2015)

restore(8) can only restore what is in a dump file.  dump(8) controls what is in those files.  So first you would have to restore the full version, then all the incrementals up to the point desired.

I strongly recommend full (level 0) rather than incremental backups.  Incremental backups drastically increase the complexity of restores.  Right when you need to restore a file is when it gets really complicated, and you also have to hope that none of those incremental backups have problems.  The only advantage of incremental backups is that they take less space.


----------



## ANOKNUSA (Aug 10, 2015)

ahgu said:


> The question is do I recover the 0 first and then 1, then 2, 3,4,5?



Yes. If possible, though, I recommend following what wblock@ suggested. One of the limitations of dump(8) is that it only backs up individual filesystems, so if you have, say, 3 partitions you back up incrementally each day, then in the course of one week you'll wind up with 21 dump archives, all containing different files. Even if you only have a single partition, the 7 dump files would still have different content. Keeping track of them or searching for a singe file would quickly become a pain.


----------

