Hi Guys,
I'm working on a (bash) script which does the following:
- Create reseller(s)/user(s) backup in /home/admin/admin_backups/
- Rsync backups to new server
- Import reseller(s)/user(s) backup on new server (with the new servers ipaddress)
- Rsync user(s) homedir after import
- Import user(s) database(s) after import (direct mysql dump)
I want to exclude the following (just like unchecking the boxes in Admin Backup/Transfer):
- Domains Directory
- E-Mail Data
- Database Data
I got this working on one server by capturing the the request in Chrome:
action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=%2Fhome%2Fadmin%2Fadmin%5Fbackups&option%30=autoresponder&option%31=database&option%32=email&option%33=emailsettings&option%34=forwarder&option%35=ftp&option%36=ftpsettings&option%37=list&option%38=subdomain&option%39=vacation&owner=admin&select%30=${USER}&type=admin&value=multiple&what=select&when=now&where=local
But on the next server it seems the options are different, so a much larger backup is created. Is there another way to create backups (and works on all DirectAdmin servers) from the shell which only contains:
- Subdomain Lists
- Ftp Accounts
- Ftp Settings
- Database Settings
- E-Mail Accounts
- E-Mail Settings
- Vacation Messages
- Autoresponders
- Mailing Lists
- Forwarders
I also have two other challenges:
1) I would like to create user backups without cronjobs. Is that possible? This way we can test if everything works (pre-sync), and then import cronjobs just before going live after the definitive migration. I can clear crontab.conf and crontab afterwards, but this is a 'dirty' workaround. Sometimes I still have cronjobs enabled for some users because my script was already finished but the user was still beïng imported in the background.
2) I want my script to (sleep) wait for the user import to complete before continuing doing other tasks. Do you guys have any suggestions for this? I can't rely on the ticket system in DirectAdmin or the DirectAdmin system.log.
I'm working on a (bash) script which does the following:
- Create reseller(s)/user(s) backup in /home/admin/admin_backups/
- Rsync backups to new server
- Import reseller(s)/user(s) backup on new server (with the new servers ipaddress)
- Rsync user(s) homedir after import
- Import user(s) database(s) after import (direct mysql dump)
I want to exclude the following (just like unchecking the boxes in Admin Backup/Transfer):
- Domains Directory
- E-Mail Data
- Database Data
I got this working on one server by capturing the the request in Chrome:
action=backup&append%5Fto%5Fpath=nothing&database%5Fdata%5Faware=yes&email%5Fdata%5Faware=yes&local%5Fpath=%2Fhome%2Fadmin%2Fadmin%5Fbackups&option%30=autoresponder&option%31=database&option%32=email&option%33=emailsettings&option%34=forwarder&option%35=ftp&option%36=ftpsettings&option%37=list&option%38=subdomain&option%39=vacation&owner=admin&select%30=${USER}&type=admin&value=multiple&what=select&when=now&where=local
But on the next server it seems the options are different, so a much larger backup is created. Is there another way to create backups (and works on all DirectAdmin servers) from the shell which only contains:
- Subdomain Lists
- Ftp Accounts
- Ftp Settings
- Database Settings
- E-Mail Accounts
- E-Mail Settings
- Vacation Messages
- Autoresponders
- Mailing Lists
- Forwarders
I also have two other challenges:
1) I would like to create user backups without cronjobs. Is that possible? This way we can test if everything works (pre-sync), and then import cronjobs just before going live after the definitive migration. I can clear crontab.conf and crontab afterwards, but this is a 'dirty' workaround. Sometimes I still have cronjobs enabled for some users because my script was already finished but the user was still beïng imported in the background.
2) I want my script to (sleep) wait for the user import to complete before continuing doing other tasks. Do you guys have any suggestions for this? I can't rely on the ticket system in DirectAdmin or the DirectAdmin system.log.