restoreacct
Restore Eenos Backup
This tool will help you to restore backup generated from an eenos hosting control panel. You can restore the entire backup or a part of the backup like files, email ,email, database, etc .etc.
If you are restoring a full backup and the account 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 ,file, or a folder containing backup of the account.
You can also use 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 usebe used to assign a new home directory path for the restoring account.
By default, use the home directory mentioned in 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 does not exist or is not available ,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 inon the server.
--newname
Change the eenos user name with a new user name. This option will assign a new user name for the restoring hosting accounts.
These options will change database name prefixes and home directory name, which may break some websites or applications that isare already configured inside the hosting account. You may 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 option, if the account already exists in the server.
If the account exists, it will replace the data only .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 mysqlMySQL databases from the backup,
Command:
/usr/local/eenos/scripts/restoreacct --skipmysql PATH_TO_BACKUP
--skiphome
To skip the 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 Mongodb database restore from the backup,
Command:
/usr/local/eenos/scripts/restoreacct --skipmongodb PATH_TO_BACKUP
--skipmailman
This is a future option. Restoring and backup of the Mailman3 mailing list is not supported yet.
--skipemail
To exclude restoring of email accounts from the 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.have them.
If the backup is a reseller account backup ,backup, the restore operation will restore the reseller privileges as the 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 directory files from the backup. This may include everything inside the home directory.
Command:
/usr/local/eenos/scripts/restoreacct --home PATH_TO_BACKUP
Restore Domain or Website
Restore a website content from the backup. You can restore a full website files from a backup.
Command:
/usr/local/eenos/scripts/restoreacct --domain DOMAIN PATH_TO_BACKUP
where DOMAIN is the website name.
Restore Email Account
You can restore a single email account from the backup.
If the email account already existsexists, ,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 name.
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 MONGODBMongoDB is the MongoDB database name.
Restore File
You can restore a single file from the backup .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's home directory ( eg :eg: public_html/foo/fun.php )
Restore the Directory or Folder
You can restore a single directory or folder from the backup.
Command:
/usr/local/eenos/scripts/restoreacct --dir DIR PATH_TO_BACKUP
where DIR is the relative path to the directory from the user's home directory ( Ex: public_html/foo )