# Importing old backups

**URL:** https://kopia.discourse.group/t/importing-old-backups/329
**Category:** General
**Created:** [March 20, 2021, 5:47pm UTC](https://kopia.discourse.group/t/importing-old-backups/329 "2021-03-20T17:47:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jed](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@jed](https://kopia.discourse.group/u/jed)
#### Post date: [March 20, 2021, 5:47pm UTC](https://kopia.discourse.group/t/importing-old-backups/329/1 "2021-03-20T17:47:16Z")

</div>

I have an archive of backups going back several years. What’s the best way of importing these into Kopia so they show up alongside the snapshots that Kopia creates? Ideally, Kopia would treat each old backup as if it were created by Kopia itself and each backup would be associated with an appropriately old timestamp.

Assume these old backups can be mounted and treated like any other file system.

Thanks!

---

<div class="post-metadata">

### Author: ![jkowalski](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/jkowalski/32/3_2.png) [@jkowalski](https://kopia.discourse.group/u/jkowalski)
#### Post date: [March 20, 2021, 10:17pm UTC](https://kopia.discourse.group/t/importing-old-backups/329/2 "2021-03-20T22:17:33Z")

</div>

You can override timestamps for snapshots (using `--start-time` and `--end-time` flags) but I’m not really sure how feasible/practical it is to import an old archive of snapshots from another tool.

Here’s something you can try:

Try writing a script to restore snapshots one by one in order into a temporary directory, then `kopia snapshot create --start-time ... --end-time /path/to/temp/directory` (snapshots should should be reasonably quick assuming the changes were organic and incremental).

Once you have snapshots history imported you can copy/move the manifests to make them appear as history of the source directory using `kopia snapshot copy-history` or `kopia snapshot move-history`

---

<div class="post-metadata">

### Author: ![sylphio](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@sylphio](https://kopia.discourse.group/u/sylphio)
#### Post date: [February 8, 2022, 11:55pm UTC](https://kopia.discourse.group/t/importing-old-backups/329/3 "2022-02-08T23:55:27Z")

</div>

Thank you for the method, jkowalski. Your answer gave me the elements that I needed to write my import script. I can confirm that it works. I imported from BackInTime, but it would work with any other. Only the restoration (or mounting) of snapshot depends on the original backup software.

This is the only thread I have found on this topic. Therefore, for future readers, I would like to point out two points to be careful about.

1. The retention policy should be set carefully, at least on the eventual source path (i.e. destination of `kopia snapshot move-history`) and possibly on the temporary restoration directory (`/path/to/temp/directory` in jkowalski’s post). Otherwise, some snapshots may be removed at the next maintenance.
2. The timestamp format involved several attempts on my part to find what was accepted by kopia. It is not documented (or I could not find it) and the ISO format (ISO 8601) is not supported. I eventually used the format displayed by `kopia snapshot list`, which was accepted.

I hope that this will help someone else. The ability to import my existing backups was the last thing holding me back from switching to kopia.
