# Anope complains it cannot backup DBs.

## Colt45

```
[Jan 07 00:00:14 2010] Backing up databases                                                                    

[Jan 07 00:00:14 2010] Backup of nick.db failed.                                                               

[Jan 07 00:00:14 2010] Backup of bot.db failed.                                                                

[Jan 07 00:00:14 2010] Backup of chan.db failed.                                                               

[Jan 07 00:00:14 2010] Backup of hosts.db failed.                                                              

[Jan 07 00:00:14 2010] Backup of oper.db failed.                                                               

[Jan 07 00:00:14 2010] Backup of news.db failed.                                                               

[Jan 07 00:00:14 2010] Backup of exception.db failed.
```

Yet, it appears its being written out?

```

sarah data # ls -alh

total 176K

drwxr-xr-x 6 anope anope 4.0K Jan  7 04:52 .

drwxr-xr-x 4 anope root  4.0K Aug 21 13:24 ..

-rw-rw---- 1 anope anope    0 Nov 26  2007 autoop.db

-rw------- 1 anope anope    5 Jan  7 04:52 bot.db

-rw------- 1 anope anope  260 Jan  7 04:52 chan.db

-rw------- 1 anope anope    6 Jan  7 04:52 exception.db

-rw------- 1 anope anope    5 Jan  7 04:52 hosts.db

drwxr-xr-x 2 anope anope 4.0K Aug 21 13:24 languages

drwxr-xr-x 2 anope anope 4.0K Jan  7 00:00 logs

drwxr-xr-x 3 anope anope 4.0K Aug 21 13:24 modules

-rw------- 1 anope anope    6 Jan  7 04:52 news.db

-rw------- 1 anope anope 2.1K Jan  7 04:52 nick.db

-rw------- 1 anope anope   20 Jan  7 04:52 oper.db

-rw-rw---- 1 anope anope    0 Nov 26  2007 os_info.db
```

----------

## Colt45

bump

----------

## JC Denton

It's been a long time since I used Anope.  I was mostly using Epona way back when...

Anyways.  Perhaps it's trying to make an additional "backup" copy of the database(s) as the log messages suggest? Have you checked quota, file & directory permissions?

----------

## ProgVal

Hello,

I have exactly the same problem on Gentoo.

I search in all the filesystem : I am unable to find the backup directory (only the log directory, but it's only logs, not backups)

The configuration file don't "tell" me where are the backups.

Thank you in advance,

ProgVal

----------

## sendoshin

The users on the Anope forums are fairly unhelpful about this - at least, the ones that purport to be Anope "experts" - but the answer to this issue is simple enough.  One thread included the entire source code of the backup logic, which is actually fairly simple.  It consists of a simple file rename, which simply prepends "backups/" to whatever filename is in the config file.

An important caveat to note - Anope is designed without subfolders in mind, so the filenames in the config file are treated as just that - names.  Any path component is treated as simply part of the name, as opposed to what it is - namely, a path.  So the Anope "experts" would have you wrap up your install (under Gentoo) by changing the filenames in the config to be simply names, without any directory structure at all - that is, remove the "data/" at the beginning of each file name.

But if, like me, you want to use Gentoo's default "put data files in a separate folder from the binaries" setup (which, by the way, conforms with IT best practice!), the fix involves creating two extra folders after installation:

```
mkdir /opt/anope/backups

mkdir /opt/anope/backups/data
```

 And of course make sure the permissions on both folders are correct.  Generally speaking, 

```
chown -R anope:anope /opt/anope/backups
```

 should do the trick nicely.

If this doesn't fix your issue, something else is probably wrong.  I wouldn't begin to know what.

- SenLast edited by sendoshin on Tue Oct 19, 2010 6:43 pm; edited 1 time in total

----------

## ProgVal

Thanks for the answer, but I have solved this problem (don't remember how), and I think Colt45 too.

----------

## sendoshin

That's good, then.   :Very Happy: 

I didn't see any answers, nor any posts saying "I fixed this!", so I thought I'd chime in.  I actually just fixed the same problem myself when I wrote that.  Found this thread while trying to find the solution myself.

- Sen

----------

