Re: Need help splitting a directory
Hi,
> I want to split a directory in to two sub directories
> If my home dir is 1000 Mb I can't write it completely on one cd
> So i want to split it in to two directories namely
> 1)naren.bak.1
> 2)naren.bak.2
> so that my /home/naren directory will be split in to two temporary
> directories ..
> so that i can write the images of thus formed using "mkisofs ...."
> on two cdroms
That would not necessarily imply you have to create two directories
with different names. You could rather hand over half of the file
objects in your $HOME to a first run of mkisofs + cdrecord and then
do the same with the second half of your files.
E.g. if /home/naren comprises of these sub trees :
a 300 MB
b 200 MB
c 400 MB
d 100 MB
Then you may run
mkisofs ... /a/=/home/naren/a /b/=/home/naren/b | cdrecord ... -
mkisofs ... /c/=/home/naren/c /d/=/home/naren/d | cdrecord ... -
(where "..." at least contains "-graft-points" and probably "-R" and
many other fine options from man mkisofs )
In real world situations it might become a bit tricky to find the
right split for your list of file addresses. Especially if a subtree is
larger than a CD or if your $HOME grows. You may need an automat.
Be invited to download
http:/scdbackup.webframe.org/scdbackup-0.8.2.tar.gz
after you had a look at
http://scdbackup.webframe.org/examples.html#scdbackup_home
and in general at
http://scdbackup.webframe.org/examples.html
> and afterwards i also need help how do i combine them again.
> so that after copying two backup directories from the cdrom
> naren.bak.1 and naren.bak.2 in to
> /tmp directory I want to combine this
> two to make it again one directory say "naren"
> How do i do this
You just mount your first CD (e.g. at /media/cdrom) and copy with
a normal command like
cp -a /media/cdrom/* $HOME
Then you mount your second CD and do the same again.
Be aware that some Linux ISO filesystem drivers do not show w-permissions of
directories despite they have been stored in Rockridge extension records.
You will have to record those permissions yourself (or have scdbackup_home
do this for you). After copying your data back to disk you may have to restore
the permissions by your own means (or by running
/media/cdrom/added_by_scdbackup/DIR_PERMS.sh.gz).
Have a nice day :)
Thomas
Reply to: