# Altering BackUp zip/tar files, acceptable?

**URL:** <https://forum.hestiacp.com/t/altering-backup-zip-tar-files-acceptable/14892>\
**Category:** Backups\
**Created:** [June 27, 2024, 7:44pm UTC](https://forum.hestiacp.com/t/altering-backup-zip-tar-files-acceptable/14892 "2024-06-27T19:44:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![emeeder](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/e/a587f6/32.png) [@emeeder](https://forum.hestiacp.com/u/emeeder)\
**Post date:** [June 27, 2024, 7:44pm UTC](https://forum.hestiacp.com/t/altering-backup-zip-tar-files-acceptable/14892/1 "2024-06-27T19:44:03Z")

</div>

I have a number of backups within the last months from one user account that I want restore. The most reliable backup of the main website is from about 28 days ago. We don’t really want to lose the current emails. How acceptable would it be to remove the ‘mail’ folder and replace with the mail folder from yesterdays backup?  
How would i do this without corrupting the .tar file.

I’m thinking i would have to unzip backup file. replace the mail folder with the more current one. then compress the file again.

Would this create issues I’m not aware of?

Thanks for any input.

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [June 28, 2024, 5:37am UTC](https://forum.hestiacp.com/t/altering-backup-zip-tar-files-acceptable/14892/2 "2024-06-28T05:37:01Z")

</div>

You can just only restore the web domain via command line

v-restore-web-domain

---

<div class="post-metadata">

**Author:** ![emeeder](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/e/a587f6/32.png) [@emeeder](https://forum.hestiacp.com/u/emeeder)\
**Post date:** [June 29, 2024, 2:06pm UTC](https://forum.hestiacp.com/t/altering-backup-zip-tar-files-acceptable/14892/3 "2024-06-29T14:06:43Z")

</div>

So i assume i run that in the user directory? and i specify with ‘domain’ which domain i want to restore?  
Will it find and restore the database associated with that domain?  
Does that command search within the user Tar file to restore all relevant data?

Thanks

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [June 30, 2024, 8:20am UTC](https://forum.hestiacp.com/t/altering-backup-zip-tar-files-acceptable/14892/4 "2024-06-30T08:20:41Z")

</div>

No it doesn’t matter it will always restore it to the correct directory

---

<div class="post-metadata">

**Author:** ![emeeder](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/e/a587f6/32.png) [@emeeder](https://forum.hestiacp.com/u/emeeder)\
**Post date:** [July 1, 2024, 1:43pm UTC](https://forum.hestiacp.com/t/altering-backup-zip-tar-files-acceptable/14892/5 "2024-07-01T13:43:04Z")

</div>

Thanks Eris for your quick replies.  
Is there documentation i can refer to about v-restore-web-domain command. I dont see that specifically listed in the Docummentation/Restore section.

My user has issues with their website and want to go back to a backup from May 31.  
They have 2 websites listed in there user account  
[domain.com](http://domain.com) (redirected to [subdomain.domain.com](http://subdomain.domain.com))  
[subdomain.domain.com](http://subdomain.domain.com)

if i run the command  
v-restore-web-domain user [subdomain.domain.com](http://subdomain.domain.com)  
Is this the correct command?  
Both domains are in the one user backup zip file.  
Will it overwrite the existing website and associated database or do i need to delete it 1st?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [July 1, 2024, 2:36pm UTC](https://forum.hestiacp.com/t/altering-backup-zip-tar-files-acceptable/14892/6 "2024-07-01T14:36:08Z")

</div>

Yes that is correct

It won’t overwrite the database you need to do that separate via

v-restore-database

---

<div class="post-metadata">

**Author:** ![emeeder](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/e/a587f6/32.png) [@emeeder](https://forum.hestiacp.com/u/emeeder)\
**Post date:** [July 4, 2024, 2:25pm UTC](https://forum.hestiacp.com/t/altering-backup-zip-tar-files-acceptable/14892/7 "2024-07-04T14:25:12Z")

</div>

I entered this command:

v-restore-web-domain username [subdomain.domain.com](http://subdomain.domain.com)

it says command not found.  
v-restore-web-domain in this part does the ‘domain’ need to be the domain i’m restoring? I had it just as domain.

does the tar file not get referenced anywhere. I moved my current tar backup file into another directory so that it would only see the one backup file that i want restored from.

Thanks

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [July 4, 2024, 2:32pm UTC](https://forum.hestiacp.com/t/altering-backup-zip-tar-files-acceptable/14892/8 "2024-07-04T14:32:22Z")

</div>

> [@emeeder](#):
>
> v-restore-web-domain username [subdomain.domain.com](http://subdomain.domain.com)

Use `sudo su -` before executing the command or use the full path to the command:

```t
/usr/local/hestia/bin/v-restore-web-domain USER BACKUP DOMAIN

```

> [@emeeder](#):
>
> does the ‘domain’ need to be the domain i’m restoring?

Yes, it is the domain in your backup that you want to restore.

> [@emeeder](#):
>
> does the tar file not get referenced anywhere

Yes, it is, the second argument of `v-restore-web-domain` command (just the file name, not the full path to the file name).

> [@emeeder](#):
>
> I moved my current tar backup file into another directory so that it would only see the one backup file that i want restored from.

Your backup file **must** be moved to `/backup/` dir

---

<div class="post-metadata">

**Author:** ![emeeder](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/e/a587f6/32.png) [@emeeder](https://forum.hestiacp.com/u/emeeder)\
**Post date:** [July 4, 2024, 9:33pm UTC](https://forum.hestiacp.com/t/altering-backup-zip-tar-files-acceptable/14892/9 "2024-07-04T21:33:13Z")

</div>

Thanks again for that answer.  
i was missing the backup.tar file name. I see this way i can specify what backup file to use.

By the way, by the time i got around to doing the backup, the automatic backup had already deleted my, just uploaded, recovery backup .tar file. It was in middle of doing a current backup. Just keep that in mind.

Also the command checks to see server load and will not initiate the recovery if the server load is too high. I had to shutdown my problematic website to bring the server load down.

then it eventually worked.

Thanks for yoru help

---

<div class="post-metadata">

**Author:** ![system](https://forum.hestiacp.com/uploads/default/original/1X/d9a5b68bf50ced83e880b56452e592b204761b19.png) [@system](https://forum.hestiacp.com/u/system)\
**Post date:** [August 3, 2024, 9:33pm UTC](https://forum.hestiacp.com/t/altering-backup-zip-tar-files-acceptable/14892/10 "2024-08-03T21:33:59Z")

</div>

Closed on August 3, 2024, 9:33pm UTC

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