Reseller FTP User backups

ReSpawNnL

New member
Joined
Aug 24, 2010
Messages
3
Hi guys,

I've been fiddling around with the User Backups option in my reseller panel, and I'm starting to think that it isn't possible. What? This:

I've created a FTP server on my server, here - at home, and it all works fine. Even with the DirectAdmin ftp backup to server. It writes it as myUsername.tar.gz and that's perfect. Now, seeing that the username never changes and I want backups on a dayly basis, with a history of 5 to 7 days, I need folders. Is there a way to write the remote path to a specified format?

I've got the home directory set up on "H:/Backups" on my PC. So, the FTP directs to "/" since that's the root. Now, I need a format. Like so:

/August/24/20100824-1611/username1.tar.gz
/August/24/20100824-1611/username2.tar.gz

or

/week32/24/20100824-1611/username1.tar.gz
/week32/24/20100824-1611/username2.tar.gz

Is this at all possible?
 
You could take a look at my backup script at http://www.directadmin.com/forum/showthread.php?t=37317#8 it does pretty much what you ask. You need root access, a cron job and have the admin backups locally stored.

I don't think you can do this within the DA panel as the options are limited. If you don't want to run such script on your DA server, you could also consider running a windows script on your ftp server machine and let it move backups and create directories there.
 
Thanks for the reply. Hoping that it would be possible with DirectAdmin, I also looked into what you're saying.

I've created, as said, a FTP server. The cron command executes the backup at 12:30. At 13:00 Windows task schedueler automaticly executes Chrome, browses to a php file (set up with WAMP, both on autostart), executes the file and the file filters it into the matching directory. Naturally, I don't have the creation time, so I find it with the filemtime() function from PHP to fetch the modification/creation time.

Perhaps that could benifit anyone! :)

Aside from that, is there a way to create the same cron command for the user level? I've got both a user level and reseller level account (not under the same user) and I want to set up the same system.
 
Naturally, I don't have the creation time, so I find it with the filemtime() function from PHP to fetch the modification/creation time.
If you just have a dir with incoming files, you can just run a script which moves everything in there to the dir of the current date for example. That should work if everything is automated.

Aside from that, is there a way to create the same cron command for the user level? I've got both a user level and reseller level account (not under the same user) and I want to set up the same system.

I've googled it and found this http://files.directadmin.com/services/all/backup.php (http://www.directadmin.com/forum/showthread.php?t=32966)

edit: which also makes it possible what you wanted in the first place, as you can use date vars like %b-%e-%Y.
 
Last edited:
I've just finished a script that logs into DirectAdmin using user:p[email protected] and executes the page from the create backup. You need to send CURLOPT_POSTFIELDS with select0 to select10 and then check which you want to back up (same corrolation to the backend). Pretty easy, works completely automated now. When finished, my script created a backup at 03:00 in the night and when I boot my computer, it fetches it, downloads it and sorts it. :)
 
Back
Top