Please if you can help me when I made the backup in the "root" /home the size of the root space is not big enough so I try to make the backup on another place "/backup" but the following message appears : (-bash: file_name : Prmission denied
)
Asked
Active
Viewed 630 times
0

Lucas Kauffman
- 16,880
- 9
- 58
- 93

Mohammad AL-Rawabdeh
- 1,612
- 12
- 33
- 54
-
does `svnadmin dump /path/to/repo > /dev/null` and `head /dev/urandom > /path/to/dumpfile` work? – krissi Aug 30 '10 at 12:43
2 Answers
0
You may not have permission to (a) read files in /home, especially if its a shared host, or (b) write to /backup. If you run it as root (using either su or sudo), you should be able to run the command.
EDIT: When you run sudo, what you'll want to do is sudo sh -c 'svnadmin dump myrepos > dumpfile'
; that way, you're running the entire command--redirection and all--as root.

Andrew M.
- 11,182
- 2
- 35
- 29
-
i used sudo but the same message appear !!! i don't konow why ... in other word the following command don't work any where elsa home "svnadmin dump myrepos > dumpfile" ... any other plase give me "NO Prmission" – Mohammad AL-Rawabdeh Aug 30 '10 at 11:52
-
How did you run that command? If you did `sudo svnadmin dump myrepos > dumpfile`, you are only assuming superuser access for the svnadmin aspect. What you'll want to do is `sudo sh -c 'svnadmin dump myrepos > dumpfile'`; that way, you're running the entire command--redirection and all--as root. – Andrew M. Aug 30 '10 at 12:50
0
You wrote you use sudo. The command
# sudo svnadmin dump myrepos > dumpfile
will run ``svnadmin dump myreposwith the rights of root. The
> dumpfile` part will not have the rights of root.
You could write a script, put the command in it and sudo the whole script or construct a one-liner like
# sudo svnadmin dump myrepos | sudo tee dumpfile > /dev/null
or
# sudo sh -c 'svnadmin dump myrepos > dumpfile'
or
# svnadmin dump myrepos | sudo tee dumpfile > /dev/null
if you are allowed to read myrepos
with user-rights

krissi
- 3,387
- 1
- 19
- 22