restoreacct
Restore Eenos Backup
This tools will help to restore backup generated from an eeos hosting control panel. You can restore the entire backup or a part of the backup like files, email , database etc.,
If you are restoring a full backup and the account is already exists in the server, it will only overwrite the data. If you wish to do a full clean restore, remove the account from the server before restoring.
Command:
/usr/local/eenos/scripts/restoreacct PATH_TO_BACKUP
Where PATH_TO_BACKUP is the full path to the backup file
Command Options:
usage: restoreacct [options] PATH_TO_BACKUP
Restore backup of eenos hosting account. By Default restore full backup
Required:
PATH_TO_BACKUP Full path to Eenos backup
Option(s):
-h, --help show this help message and exit
--log Create a custom log file
Restore Type:
--full Restore full account. This is default option
--home Restore home directory
--domain DOMAIN Restore a website content
--email EMAIL Restore an email account
--mysqldb MYSQLDB Restore a MySQL database
--pgsqldb PGSQLDB Restore a PgSQL database
--mongodb MONGODB Restore a MongoDB database
--file FILE Restore a single file. The file path need to be
relative to homedir
Example : public_html/foo/fun.php
--dir DIR Restore a folder. The directory path need to be
relative to homedir
Example : public_html/foo
Full account restore option(s):
--disk_mount DISK_MOUNT
The disk mount point to create home directory.
By default use the home directory from backup.
(Example : /home2)
--ipv4 IPV4 Assign a dedicated IPv4 address.
By default use the main shared IP address or
the IP address from the backup, if exists
--newname NEWNAME Restore backup into new eenos user name
This will rename the home directory and database names.
WARNING !!! : The websites may stop working due to the
change in storage path and database names
--skipname Use the same user name from the backup
By default enabled
--force Force restore if account exist in server.
This will replace the data only.
--skipmysql Exclude MySQL database(s) restore
--skiphome Exclude Homedir restore
--skiplets Exclude Lets encrypt auto ssl restore
--skippgsql Exclude PgSQL database(s) restore
--skipmongodb Skip Mongodb database(s) restore
--skipmailman Exclude Mailman3 mailing list backups
--skipemail Exclude email accounts restore
--skipbwdata Exclude bandwidth usage history
--skipdiskusage Exclude disk usage history
--skippublichtml Exclude public_html folder restore
--skipreseller Exclude reseller privileges
Restore Full Account
To restore a full account you may use the following command.
/usr/local/eenos/scripts/restoreacct --full PATH_TO_BACKUP
Where PATH_TO_BACKUP is the location path to the backup file. The PATH_TO_BACKUP may be a .tar or .tar.gz file , or a folder containing backup of the account.
You can also use the the following options along with full restore options.
Full Restore Options
This option will make changes or data exclude operations during backup restore process.
--disk_mount
This option will use to assign a new home directory path for the restoring account.
By default use the home directory mentioned on the backup file
Command:
/usr/local/eenos/scripts/restoreacct --disk_mount DISK_MOUNT PATH_TO_BACKUP
Where DISK_MOUNT is the new home ( Example: /home2)
--ipv4
This option will change the IPV4 address of the account by assigning the new IP address. If the given IP is not exists or not available , the process will use the main shared IPv4 address of the account.
By default the restore process will use the IP from the backup and if the IP is not available, it will use the main shared IP
Command:
/usr/local/eenos/scripts/restoreacct --ipv4 IPV4 PATH_TO_BACKUP
Where IPV4 is the free IP available in the server
--newname
Change the eenos user name with new user name. This option will assign new user name for the restoring hosting accounts.
This options will change database name prefixes and home directory name. which may break some websites or application that is already configured inside the hosting account. You need to manually edit the website scripts to fix the new paths and database names. You are Warned !!!
Command:
/usr/local/eenos/scripts/restoreacct --newname NEWNAME PATH_TO_BACKUP
Where NEWNAME is a Unix user name for the new eenos hosting account.
--force
Use this options if the account already exist ins the server.
If the account exists it will replace the data only . This doesn't provide a clean full restore action.
You may use the following command to force the restore.
/usr/local/eenos/scripts/restoreacct --force PATH_TO_BACKUP
--skipmysql
To skip restoring all mysql databases from the backup.
Command:
/usr/local/eenos/scripts/restoreacct --skipmysql PATH_TO_BACKUP
--skiphome
To skip home directory restore of the account
Command:
/usr/local/eenos/scripts/restoreacct --skiphome PATH_TO_BACKUP
--skiplets
To skip regeneration of Let's encrypt auto ssl certificates.
Command:
/usr/local/eenos/scripts/restoreacct --skiplets PATH_TO_BACKUP
--skippgsql
To exclude PostgreSQL database restore from the backup
Command:
/usr/local/eenos/scripts/restoreacct --skippgsql PATH_TO_BACKUP
--skipmongodb
To exclude mongodb database restore from backup
Command:
/usr/local/eenos/scripts/restoreacct --skipmongodb PATH_TO_BACKUP
--skipmailman
This is a future options. Restoring and backup of Mailman3 mailing list is not available yet
--skipemail
To exclude restoring of email accounts from backup
Command:
/usr/local/eenos/scripts/restoreacct --skipemail PATH_TO_BACKUP
--skipbwdata
To exclude bandwidth usage data history from the backup
Command:
/usr/local/eenos/scripts/restoreacct --skipbwdata PATH_TO_BACKUP
--skipdiskusage
To exclude disk usage history data from the backup
Command:
/usr/local/eenos/scripts/restoreacct --skipdiskusage PATH_TO_BACKUP
--skippublichtml
To exclude the public_html folder , it is the document root of the main account.
Command:
/usr/local/eenos/scripts/restoreacct --skippublichtml PATH_TO_BACKUP
--skipreseller
Exclude the reseller privileges on the account if have.
If the backup is a reseller account backup , the restore operation will restore the reseller privileges as default restore option.
Command:
/usr/local/eenos/scripts/restoreacct --skipreseller PATH_TO_BACKUP
Restore Home Directory From Backup
The eenos restore tool has this unique feature to restore home directly files from the backup. This may include everything inside home directory.
Command:
/usr/local/eenos/scripts/restoreacct --home PATH_TO_BACKUP
Restore Domain or Website
Restore a website content form the backup. You can restore a full website files form a backup.
Command:
/usr/local/eenos/scripts/restoreacct --domain DOMAIN PATH_TO_BACKUP
Where DOMAIN is the website time
Restore Email Account
You can restore a single email account from the backup.
If the email account already exists ,it will sync the emails.
Command:
/usr/local/eenos/scripts/restoreacct --email EMAIL PATH_TO_BACKUP
Where EMAIL is the email account name
Restore MySQL Database
You can restore a single MySQL database from the backup
Command:
/usr/local/eenos/scripts/restoreacct --mysqldb MYSQLDB PATH_TO_BACKUP
Where MYSQLDB is MySQL database aame
Restore PostgreSQL Database
You can restore a single PostgreSQL database from the backup
Command:
/usr/local/eenos/scripts/restoreacct --pgsqldb PGSQLDB PATH_TO_BACKUP
Where PGSQLDB is the PgSQL database name
Restore MongoDB Database
You can restore a single MongoDB database from the backup
Command:
/usr/local/eenos/scripts/restoreacct --mongodb MONGODB PATH_TO_BACKUP
Where MONGODB is the MongoDB database name
Restore File
You can restore a single file from he backup . To restore the file use the following command
Command
/usr/local/eenos/scripts/restoreacct --file FILE PATH_TO_BACKUP
Where FILE is the relative path to the file from the user home directory ( eg : public_html/foo/fun.php )
Restore Directory or Folder
You can restore a single directory or folder from the back.
Command:
/usr/local/eenos/scripts/restoreacct --dir DIR PATH_TO_BACKUP
Where DIR the relative path to the directory from user home directory ( Ex: public_html/foo )