SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Question re: mving large directories in an rnsapshot setup
Author Message
Post Question re: mving large directories in an rnsapshot setup 
Hi all,

I've inherited an older/established mail server that the prior admin had
set up and was using rsnapshot to keep it backed up.

Currently the mail is in maildir format, with the base being:

/var/virtual/user < at > example.com

I want to change this to

/var/vmail/domain.com/user

My question is, what would be the best way to do this without having to
start all over with the backups? There isn't enough room to do another
*full* backup on the backup server (it is currently about 75% full)...

Can I simply mv all of the snapshots individually after mv'ing the
primary maildirs but before running the next rsnapshot cycle?

Thanks for any suggestions on how to best handle this...

--

Best regards,

Charles

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Question re: mving large directories in an rnsapshot setup 
Hallo, Charles,

Du meintest am 21.01.12:

Can I simply mv all of the snapshots individually after mv'ing the
primary maildirs but before running the next rsnapshot cycle?

I wouldn't move them all but only the last dir to the new place.

I do this work often with the help of "mc" - it works as desired.

right side: list with /path/to/new/dir
left side: list with old dir, cursor on the old dir

on the left side: f6
Moving in this way needs some (few) seconds.

Changing the name(s) from "user < at > example.com" to "user" is a job for a
script.

Working with the command "mv" may lead to a question wether the hard
links may be destroyed - seems to depend p.e. from the distribution.

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Question re: mving large directories in an rnsapshot setup 
Hi Helmut,

Thanks for the reply...

On 2012-01-21 11:45 AM, Helmut Hullen <Hullen < at > t-online.de> wrote:
Can I simply mv all of the snapshots individually after mv'ing the
primary maildirs but before running the next rsnapshot cycle?

I wouldn't move them all but only the last dir to the new place.

I do this work often with the help of "mc" - it works as desired.

right side: list with /path/to/new/dir
left side: list with old dir, cursor on the old dir

on the left side: f6
Moving in this way needs some (few) seconds.

Changing the name(s) from "user < at > example.com" to "user" is a job for a
script.

I was actually planning on using mmv to do this, ie:

mmv -r "* < at > example.com" "#1"

will strip the ' < at > example.com' from all of the maildirs

Then I'd simply:

mv /var/virtual /var/vmail

Working with the command "mv" may lead to a question wether the hard
links may be destroyed - seems to depend p.e. from the distribution.

*That* is what I'm worried about...

This is on gentoo linux, fully up to date, kernel 3.0.6...

--

Best regards,

Charles

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Question re: mving large directories in an rnsapshot setup 
Hallo, Charles,

Du meintest am 21.01.12:

I was actually planning on using mmv to do this, ie:

mmv -r "* < at > example.com" "#1"

will strip the ' < at > example.com' from all of the maildirs

Then I'd simply:

mv /var/virtual /var/vmail

Working with the command "mv" may lead to a question wether the hard
links may be destroyed - seems to depend p.e. from the distribution.

*That* is what I'm worried about...


You can test it:

mkdir -p /tmp/old
mkdir -p /tmp/new
touch /tmp/old/old.file
ln /tmp/old/old.file /tmp/old/ancient.file

first test:

ls -l /tmp/old

must show the two (empty) files and the hardlink count set to 2 between
the rights and the owner.

Then:
mv /tmp/old/ancient.file /tmp/new
ls -l /tmp/new

must show the same hardlink count.

Cross-test: when you move one of the hardlinked files to another
partition then the hardlink count decreases (on both partitions) to 1.

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Question re: mving large directories in an rnsapshot setup 
On Sat, Jan 21, 2012 at 11:10 AM, Charles Marcus
<CMarcus < at > media-brokers.com> wrote:
Hi all,

I've inherited an older/established mail server that the prior admin had
set up and was using rsnapshot to keep it backed up.

Currently the mail is in maildir format, with the base being:

/var/virtual/user < at > example.com

I want to change this to

/var/vmail/domain.com/user

Why?

Given that you want to do this, and it's in maildir format, you should
be able to use "cp -al" to replicate the user directories from your
old location to the new locations with hardlinks, and use nothing:
maildir format does not edit files, it renames them to show their
modified status, so the hard links will be preserved and prevent
wasting space.

That said, I urge you to do a good backup, perhaps on an external hard
drive, before starting this.

My question is, what would be the best way to do this without having to
start all over with the backups? There isn't enough room to do another
*full* backup on the backup server (it is currently about 75% full)...

Create an artificial "daily.0" or whatever by replicating the old
material as I described above.


Can I simply mv all of the snapshots individually after mv'ing the
primary maildirs but before running the next rsnapshot cycle?

See above. You only need to re-arrange the *last* snapshot, unless you
want to get cute and provide direct user access to the backups in
identical format to their current access.

Thanks for any suggestions on how to best handle this...

--

Best regards,

Charles

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB