---
title: Filesystem Backup and Restore
slug: kronpam-installation-guide/filesystem-backup-and-restore
description: Learn how to stop database replication and services, backup and restore the filesystem, and execute post-backup operations with this comprehensive document. Discover commands to halt SymmetricDS replication, terminate Single Connect module services, and b
docTags: 
createdAt: 2022-08-19T08:44:09.000Z
---

:::hint{type="info"}
**Prerequisite**
This procedure requires stopping applications. Complete all active operations on the instance.
:::

# Stopping Database Replication

:::hint{type="info"}
Execute the following commands only on the node where the backup/restore operation is performed.
:::

1. Check SymmetricDS replication status.
   **\[root\@kronpam\~]#&#x20;**/u01/sym/symmetric-server-3.10.5/bin/sym\_service status

2. Stop SymmetricDS replication.
   **\[root\@kronpam\~]#** /u01/sym/symmetric-server-3.10.5/bin/sym\_service stop 

# Stopping Services

1. Stop Kron PAM module services.
   **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl stop kron\_tacacs                                             **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl stop radiusd                                                   **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl stop guacd                                                              **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl stop netright-tomcat                                        **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl stop mobile-tomcat                                         **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl stop nssoapp                                                     **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl stop sftp\_prox                                                   **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl stop sqlprox                                                        **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl stop http\_prox                                                   **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl stop ppas-9.5

# Backing up Filesystem

:::hint{type="info"}
**Prerequisite:** Check once again that you have enough disk space for backup. 
:::

1. Execute the commands described below with the root user.
   **\[root\@kronpam\~]#&#x20;**&#x63;d /                                                                                              **\[root\@kronpam\~]#&#x20;**&#x54;IMESTAMP=\`date +%Y%m%d\_%H%M\`                                  **\[root\@kronpam\~]#&#x20;**&#x74;ar -cvpzf backup\_$TIMESTAMP.tar.gz --exclude=/backup\_$TIMESTAMP.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/media --exclude=/mnt

# Restoring Filesystem

:::hint{type="danger"}
During the restoration, backup files will overwrite the existing files.
:::

1. Execute the commands described below with the root user.
   **\[root\@kronpam\~]#&#x20;**&#x63;d /                                                                                            **\[root\@kronpam\~]#&#x20;**&#x74;ar -xvpzf /backup.tar.gz -C /

2. Once extraction is complete, recreate directories that were not included in the original archive.
   **\[root\@singleconnect\~]#&#x20;**&#x6D;kdir /proc /lost+found /media /mnt

# After Backup Operations

:::hint{type="info"}
Execute the commands in the 3rd and 4th steps only on the node where the backup operation is performed.
:::

1. Start services.
   **\[root\@kronpam\~]#** systemctl start kron\_tacacs                                                      **\[root\@kronpam\~]#** systemctl start radiusd                                                          **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl start guacd                                                      **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl start netright-tomcat                                                   **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl start mobile-tomcat                                          **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl start nssoapp                                                  **\[root\@kronpam\~]#&#x20;**&#x73;ystemctl start sftp\_prox                                                   **\[root\@kronpam\~]#** systemctl start sqlprox                                                      **\[root\@kronpam\~]#** systemctl start http\_prox                                                          **\[root\@kronpam\~]#** systemctl start ppas-9.5    &#x20;
2. Start database replication.&#x20;

3. Check SymmetricDS replication status.
   **\[root\@kronpam\~]#&#x20;**/u01/sym/symmetric-server-3.10.5/bin/sym\_service status.

4. Stop SymmetricDS replication.
   **\[root\@kronpam\~]#&#x20;**/u01/sym/symmetric-server-3.10.5/bin/sym\_service status

