Backup and restore nodejs file
This commit is contained in:
parent
54c19d0d33
commit
9074a7cc2f
|
@ -249,6 +249,9 @@ function backup_configfiles {
|
||||||
if [ ! -d $temp_backup_dir ]; then
|
if [ ! -d $temp_backup_dir ]; then
|
||||||
mkdir -p $temp_backup_dir
|
mkdir -p $temp_backup_dir
|
||||||
fi
|
fi
|
||||||
|
if [ -f $NODEJS_INSTALLED_APPS_FILE ]; then
|
||||||
|
cp -f $NODEJS_INSTALLED_APPS_FILE $temp_backup_dir
|
||||||
|
fi
|
||||||
cp -f $CONFIGURATION_FILE $temp_backup_dir
|
cp -f $CONFIGURATION_FILE $temp_backup_dir
|
||||||
cp -f $COMPLETION_FILE $temp_backup_dir
|
cp -f $COMPLETION_FILE $temp_backup_dir
|
||||||
if [ -f $BACKUP_EXTRA_DIRECTORIES ]; then
|
if [ -f $BACKUP_EXTRA_DIRECTORIES ]; then
|
||||||
|
|
|
@ -114,6 +114,9 @@ function backup_configfiles {
|
||||||
if [ ! -d $temp_backup_dir ]; then
|
if [ ! -d $temp_backup_dir ]; then
|
||||||
mkdir -p $temp_backup_dir
|
mkdir -p $temp_backup_dir
|
||||||
fi
|
fi
|
||||||
|
if [ -f $NODEJS_INSTALLED_APPS_FILE ]; then
|
||||||
|
cp -f $NODEJS_INSTALLED_APPS_FILE $temp_backup_dir
|
||||||
|
fi
|
||||||
cp -f $CONFIGURATION_FILE $temp_backup_dir
|
cp -f $CONFIGURATION_FILE $temp_backup_dir
|
||||||
cp -f $COMPLETION_FILE $temp_backup_dir
|
cp -f $COMPLETION_FILE $temp_backup_dir
|
||||||
if [ -f $BACKUP_EXTRA_DIRECTORIES ]; then
|
if [ -f $BACKUP_EXTRA_DIRECTORIES ]; then
|
||||||
|
|
|
@ -108,6 +108,10 @@ function restore_configfiles {
|
||||||
temp_restore_dir=/root/tempconfig
|
temp_restore_dir=/root/tempconfig
|
||||||
restore_directory_from_usb $temp_restore_dir configfiles
|
restore_directory_from_usb $temp_restore_dir configfiles
|
||||||
|
|
||||||
|
if [ -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE ]; then
|
||||||
|
cp -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE $NODEJS_INSTALLED_APPS_FILE
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
|
if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
|
||||||
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
|
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
|
|
|
@ -115,6 +115,10 @@ function restore_configfiles {
|
||||||
temp_restore_dir=/root/tempconfig
|
temp_restore_dir=/root/tempconfig
|
||||||
restore_directory_from_friend $temp_restore_dir configfiles
|
restore_directory_from_friend $temp_restore_dir configfiles
|
||||||
|
|
||||||
|
if [ -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE ]; then
|
||||||
|
cp -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE $NODEJS_INSTALLED_APPS_FILE
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
|
if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
|
||||||
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
|
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
|
|
Loading…
Reference in New Issue