Admin Backup Issues

unixguru

Verified User
Joined
Mar 6, 2010
Messages
68
Location
Four Marks, Alton, Hampshire
I'm having issues with performing an Admin backup to a USB drive attached to my server.

I can perform Admin backups across FTP to other servers, but always get this message

/backups/admin/AdminBackups/alco/backup/<domainname>/email/passwd : Unable to get Lock on file

for many files

also

Error Compressing the backup file /backups/admin/AdminBackups/agreener/backup/home.tar.gz : /bin/tar: /backups/admin/AdminBackups/agreener/backup/home.tar.gz: Cannot open: Permission denied
/bin/tar: Error is not recoverable: exiting now

I don't believe this is caused by /home/tmp as the usually FTP backup overnight always works.

I think it may be permissions related.

Should the area be writable as root or admin?
Anything else necessary.

I just want to make some local backups so I can backup and restore regularly if disaster backups taken overnight to other systems.
 
Do these errors occur only when attempting to write to the USB drive? If so it may be related to the drive-type of the USB drive. Most use fat16 by default and a lot of posix functions don't work on that format. You may need to reformat your USB drive.

Jeff
 
Error Compressing the backup file /backups/admin/AdminBackups/agreener/backup/home.tar.gz : /bin/tar: /backups/admin/AdminBackups/agreener/backup/home.tar.gz: Cannot open: Permission denied
/bin/tar: Error is not recoverable: exiting now

I don't believe this is caused by /home/tmp as the usually FTP backup overnight always works.

I think it may be permissions related.

Should the area be writable as root or admin?

Try this, may help:

# chown -R admin:admin /backups/admin/
# find /backups/admin -type d -exec chmod 711 {} \;
 
thanks snk

Thanks snk, those exact permissions worked!!

I'm no longer having the issues.

Jason, thankyou also for your comment about FAT, this drive is ext3, but I wouldn't have thought of looking at that.
 
A little update.

This is a common problem I think.

It started happening again shortly afterwards.

It was fixed by replacing the FTP script with a cURL script.
(A directadmin approved fix)
 
Details please

Could you expound on your "it was fixed by" comment? Where did you get the script and what did you do with it? I too believe that this is a common problem since I am having it as well with all admin backups to remote server.

Thanks!
 
Thanks - I'll see if it flies

Thanks zEitEr. I saw this as a supposed solution back in like 2006 or some such. Didn't figure it still applied after all those years. Is there an official work around to address the admin restore problems? When I run it the system runs a long time extracting data but I then get a message in DA with subject: An error occurred during the restore.

For each user the system complains about: Unable to read /etc/virtual/domain.com/passwd Unable to open /etc/virtual/domain.com/passwd for reading.

Then I get the less than helpful message of: Catch all is now set to :fail:
for each domain. Followed by: Unable to read main db file for domain.com: Can't open file /var/named/domain.com.db for reading

And finally: Unable to read the ftp config file for domain domain.com

In each instance domain.com is replaced by each of my domains.

Are we the only two having this experience I wonder? I will apply the curl code to replace the ncftpput version currently in use and see if this fixes the problem.

Many thanks,
Dan
 
Back
Top