[QUOTE=IWorx-Socheat;12712]I personally like structure-only backups for really large accounts.
Also, it’ll be far quicker, and less resource intensive, to backup all accounts and grab the data I can’t easily backup (i.e., internal iworx data). Imagine that you have 300 accounts on your box, each between few hundred MB and few GB in size. Doing a full backup on all accounts could take a whole day to finish.
If instead you used rsync or rsnapshot to backup the data (which would be very quick after the first time it runs, since only changed files are copied), and you then did structure-only backups of all the accounts, this would finish much quicker.
But yes, you are right. There is more work to restore a structure-only backup, because after restoring the structure-only backup, you then have to copy the data over. But, at least you have the choice. :)[/QUOTE]
You absolutly right about the time and resource usage the full backup take. We have 300 accounts and it takes 6 hours (100GB of data)
As soon V3 will be out, we’ll try the structure only backups + Rsnapshot + Mysql backup script, if it is fine we’ll give here the config of rsnapshot and why not a SRPM of a script that do this job
Just a last question about structure only backups. Tell we want to do a full backup, so we do :
1- A rsync or rsnapshot of /home (in /backups for example)
2- A backup of the Mysql database with a mysqldump (with rsnapshot and in /backups)
3- Perform a backup.pex with --structure-only in /backups (like /home/interworx/bin/backup.pex --domains=all --structure-only --output-dir=/backups )
Is that correct ?
Do you suggest to perform first the backups.pex or the rsync ?
Now we’d like to import all the accounts (tell we have the same Ip shem)
We just have to do something like
for backup_file in /backups/*.tgz
do
~iworx/bin/import.pex --create-reseller --control-panel=siteworx --ip-address=inifile --archive=$backup_file
done
This way, even if it was a structure-only backup ALL the reseler account will be created and all reseler’s siteworx accounts will be created and attach to the good reseler ? Is it correct ?
I think about a new feature that could be very usefull.
The import command with --ip-address=inifile allows to restore accounts in the same IP defined in the backup file which is great, good !
You can also define your own ip adress with --ip-address=192.1.1.1, fine !
Indeed, if you are restoring all accounts on the same server the IP are the same, so the inifile is great, but if you are restoring/migratiing all accounts on a new server with different IP then you have to define which accounts has to be set on an IP.
It could be great to have the ability to backup only the accounts that are set on one IP. Like this it could be possible to backup these accounts in a special directory and so more easy to restore these accounts on an other IP, I mean :
Tell we have :
100 accounts on IP 111.168.1.1
100 accounts on IP 111.168.1.2
50 accounts on IP 111.168.1.3
It could be great to be able to backups these accounts like this :
/home/interworx/bin/backup.pex --domains=111.168.1.1 --structure-only --output-dir=/backups/ip-111-168-1-1
or
/home/interworx/bin/backup.pex --ip=111.168.1.1 --structure-only --output-dir=/backups/ip-111-168-1-1
or
/home/interworx/bin/backup.pex --ip=111.168.1.1 --structure-only --output-dir=/backups --filename-format “111-168-1-1-%D”
This way it would be very easy to know the IP of every accounts backuped and so more easy to restore/migrate these accounts on a new IP by doing something like this
for backup_file in /backups/ip_group1/*.tgz
do
~iworx/bin/import.pex --create-reseller --control-panel=siteworx --ip-address=1.2.3.4 --archive=$backup_file
done
or
for backup_file in /backups/111-168-1-1*.tgz
do
~iworx/bin/import.pex --create-reseller --control-panel=siteworx --ip-address=1.2.3.4 --archive=$backup_file
done
In fact, you give a good way to restore an account on a defined IP, so I think it could be a good idea to give the the ability to backup ALL accounts set on one IP, what do you think about this ?
Maybe it is already the case and I have forgotten something ?
Pascal