This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDE 3.5 - RHEL - kfmclient - folder creation

Tags: [solved] [solved] [solved]
(comma "," separated)
JohannesN
Registered Member
Posts
5
Karma
0
OS
Hello,

I try to set up a backup with a smb server at work.

The IT departement wont allow any sort of mounting and the only connection, I was able to set up, is via kfmclient copy.

This solution does work for single files in combination with a bash script and crontab.

As the backups are supposed to be used on whole folder structures, new folders need to be created on the remote smb share.

I can do this by hand, using konqueror but I was not able to do it on the shell.

Zipping the complete folder will take too long (several GB) and smb is the only connection to the server.

I hope someone has any ideas.

Greetings
Johannes
JohannesN
Registered Member
Posts
5
Karma
0
OS
I solved the problem about creating folders.

It was rather simple, as I will now copy the whole folder and not create it.

This is what I built:
Code: Select all
find /homes/XXXXX/YYYYY/Desktop/Verschiebetest/ -mindepth 1 -type d -mtime -1 -exec kfmclient copy '{}' 'smb://ZZZZZZZZ/YYYYXXXX/XXXZZZ/YYXXXX/ZZZZ/YYYYYYY{}/..' \;


When I populate the share for the first time, everything is working very smooth. But the second time, konqueror always asks me if I really want to overwrite the files/folders. How can I tell kfmclient to alway accept overwriting old files?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Try something like this:
Code: Select all
kfmclient copy --noninteractive --overwrite file:///home/ben/Media/ file:///home/ben/test/


I only tested this on my KDE Trunk system however - and only with local files - it did copy the contents of the Media/ folder recursively however.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
JohannesN
Registered Member
Posts
5
Karma
0
OS
The --noninteractive option does work, but --overwrite does not.

One step closer to my goal though :-)

Any further ideas?

edit:

Is it possible to change a konqueror config file to make "overwrite all" the standard behaviour?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Unfortunately, a quick study of the source code of both the KDE 4 and KDE 3 versions indicates that if it doesn't overwrite by default as far as I can tell. Therefore Konqueror's settings are not likely to have an impact on it.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
JohannesN
Registered Member
Posts
5
Karma
0
OS
oh, those are bad news.

What I tried next was using the kfmclient move command like this:

Code: Select all
kfmclient move 'smb:/XXXXX/xxxx/yyyyy/folder' trash:/


It does not work. I guess this is due to the smb protocol, because it does work for local files. I am not that much into file deleting on network drives. Any idea about solving this would be very much appreciated.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Have you tried the following?
Code: Select all
kfmclient remove 'smb://server/share/path/to/folder/


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
JohannesN
Registered Member
Posts
5
Karma
0
OS
kfmclient remove sadly doesnt work.

My solution so far:

I move the files to a local folder and delete them there
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Unfortunate. The output of "kfmclient --commands" should list all operations it supports.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]