Command line backups

BrianUK

Verified User
Joined
Feb 4, 2006
Messages
89
I followed info here http://help.directadmin.com/item.php?id=198

However it named the backup as user.admin.lcc.tar.gz instead of usual lcc.tar.gz - How do I get it to save file in standard format and is there a way to add the date to the filename?

Also I found I could only run the backup command as root - Why is this and is there a way to run as admin?

thanks
 
user.admin.lcc.tar.gz is the standard format when using the Admin Backup/Transfer function.
 
I found I could only run the backup command as root - Why is this and is there a way to run as admin?
Not if you want to maintain the linux/unix security model. user admin is NOT a privileged linux/unix user, so it doesn't have the same privileges as root.

You might get away with it if you manually changed the admin user's UID/GID to 0 and 0 in the /etc/passwd file, but doing so would create major security risks/issues on your server. Much better to do the backup as root.

You've been warned.

Jeff
 
Good point and noted i'll stick with root ;)

is it possible to run this command as the site admin? ie user lcc?
 
Last edited:
You will need to find the command equivalents for each level. The above command is the same as doing it from Admin Backup/Transfer from the admin level. You will need to see what gets written to the task.queue file when the other levels and specific functions are used.

lcc.tar.gz is probably what is used when a regular used creates a backup.
 
Cheers floyd the below is the output from task.queue when doing full site backup

action=backup&select%30=autoresponder&select%31=database&select%31%30=vacation&select%32=domain&select%33=email&select%34=emailsettings&select%35=forwarder&select%36=ftp&select%37=ftpsettings&select%38=list&select%39=subdomain&type=sitebackup&value=lcc

but when run fron command line I get

[1] 24396
[2] 24397
[3] 24398
[4] 24399
[5] 24400
[6] 24401
-bash: select%30=autoresponder: command not found
-bash: select%31=database: command not found
-bash: select%31%30=vacation: command not found
-bash: select%32=domain: command not found
-bash: select%33=email: command not found
[7] 24402
[8] 24403
[9] 24404
[10] 24405
[11] 24406
[12] 24408
[13] 24409
[1] Done action=backup
[2] Exit 127 select%30=autoresponder
[3] Exit 127 select%31=database
[4] Exit 127 select%31%30=vacation
[5] Exit 127 select%32=domain
[6] Exit 127 select%33=email
 
Are you trying to run this as a command?

action=backup&select%30=autoresponder&select%31=database&select%31%30=vacation&select%32=domain&select%33=email&select%34=emailsettings&select%35=forwarder&select%36=ftp&select%37=ftpsettings&select%38=list&select%39=subdomain&type=sitebackup&value=lcc
 
yes, i assume it only needs the 'select' numbers? oh and the 'echo' at the beginning?
 
And the file name you are writing to.

You are not running a command. You are supposed to be writing the command to a file.
 
damn it the end of my command got chopped off, should be

>> /usr/local/directadmin/data/task.queue

so should it be

action=backup&select%30&select%31&select%32&select%33?
 
I learn by trial and error. Give it a try. Remember you have to write is to the file, not run it.
 
can't get it to work using

action=backup&select%30&select%31&select%32&select%33

nor

action=backup&select%30=autoresponder&select%31=database&select%31%30=vacation&select%32=domain&select%33=email&select%34=emailsettings
 
Last edited:
Back
Top