# Reinstall of Nextcloud but with old data

**URL:** <https://help.nextcloud.com/t/reinstall-of-nextcloud-but-with-old-data/31164>\
**Category:** ℹ️ Support\
**Created:** [May 2, 2018, 4:15am UTC](https://help.nextcloud.com/t/reinstall-of-nextcloud-but-with-old-data/31164 "2018-05-02T04:15:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abramsondesigns](https://help.nextcloud.com/letter_avatar/abramsondesigns/32/5_5575768a8748004e209b776fc1b2916d.png) [@abramsondesigns](https://help.nextcloud.com/u/abramsondesigns)\
**Post date:** [May 2, 2018, 4:15am UTC](https://help.nextcloud.com/t/reinstall-of-nextcloud-but-with-old-data/31164/1 "2018-05-02T04:15:37Z")

</div>

Hello,

I am new here and was hopping for a point in the right direction.

I had Nextcloud up and running but a mess up with software caused the partitions on the server to be rewritten.  
So I lost the installation and its database before I could back it up. So I am working to rebuild the nextcloud server.

I kept the data folder, and therefore all of the data, on an exteral NAS and it is all intact. It is 38 gb worth of data spread over 2 user accounts, and I am trying to figure out how to reconstitute it.

I have reinstalled Nextcloud using Snap

I am trying to find a way to get the new installation to recognize the data in the 2 old accounts and use that. That way it doesn’t try to delete or overwrite it, and hopefully it doesn’t think it needs to re-sync it to the computers.

I found this tutorial:

> [@Tutorial: How to migrate mass data to a new NextCloud server](https://help.nextcloud.com/t/tutorial-how-to-migrate-mass-data-to-a-new-nextcloud-server/9418):
>
> This easy to follow tutorial will show the best practice to migrate mass data, say from an existing NAS (network drive) to a new NextCloud server, effectively and efficiently without wasting upload transfer time which may be a very lengthy process, save power and resources and get up to speed with client synchronization. Audience This tutorial is intended for everyone (beginner to advanced user) User Case You have an existing drive with over 1TB of data that you wish to migrate to your new N…

But it only seems to deal with new data being brought into a Nextcloud system. Whereas mine is old Nextcloud data I need to bring into a fresh install.

Thanks for any help,

- Jon

---

<div class="post-metadata">

**Author:** ![AlfredoCubitos](https://help.nextcloud.com/user_avatar/help.nextcloud.com/alfredocubitos/32/7687_2.png) [@AlfredoCubitos](https://help.nextcloud.com/u/AlfredoCubitos)\
**Post date:** [May 3, 2018, 8:32pm UTC](https://help.nextcloud.com/t/reinstall-of-nextcloud-but-with-old-data/31164/2 "2018-05-03T20:32:34Z")

</div>

Hi,  
under normal circumstances you can install nextcloud into an old/existing directory.  
BUT you should keep in mind, that to move away or rename the old config.php and use exact the same usernames.  
If do so every thing should work fine.

You can also rename your old directory and make a fresh install into a new directory with the old name.  
After that you can easily copy your data files from the old data dir to the new one.  
May be that is the best way.

If you have sync clients connected you should not have to copy nothing. The client will ask you if to delete the old files or to sync them. Choose sync 😉

---

<div class="post-metadata">

**Author:** ![abramsondesigns](https://help.nextcloud.com/letter_avatar/abramsondesigns/32/5_5575768a8748004e209b776fc1b2916d.png) [@abramsondesigns](https://help.nextcloud.com/u/abramsondesigns)\
**Post date:** [May 3, 2018, 9:44pm UTC](https://help.nextcloud.com/t/reinstall-of-nextcloud-but-with-old-data/31164/3 "2018-05-03T21:44:03Z")

</div>

Hello,

Thanks for the reply! -]

I ended up installing a new version with snap.

I then ended up rsync-ing the files over into the data/username/files folder (basically you 2nd suggestion)  
Then forced a re-scan with:  
sudo nextcloud.occ files:scan --all

That worked, and the sync to the client recognized everything 😁

Thanks for the reply -]

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [September 23, 2024, 5:53pm UTC](https://help.nextcloud.com/t/reinstall-of-nextcloud-but-with-old-data/31164/4 "2024-09-23T17:53:02Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 24, 2025, 8:25am UTC](https://help.nextcloud.com/t/reinstall-of-nextcloud-but-with-old-data/31164/5 "2025-01-24T08:25:31Z")

</div>


