1

I have a folder that contains a not so large amount of space called /data/backup.

I have been told that if I link that folder (/data/backup) to an even bigger folder area like /bigdata/backup for example, that I will be able to execute backups to the /data/backup folder.

It will then just create a link, but the data will be seen in both folders and the latter one (/bigdata/backup) will contain the backup results but it will show on both folders.

Since the /bigdata/backup has far more disk space then the backup will no longer fail because of space problems in the /data/backup one.

Is this true?

1 Answer 1

1

Yes, it is true! To use /bigdata/backup as if it was /data/backup you can use these commands in a terminal.

First, as you already have a /data/backup directory, move everything in it to /bigdata/backup:

mv /data/backup/* /bigdata/backup

Then delete your old directory:

rm -r /data/backup

Now you can link the directories with:

ln -s /bigdata/backup /data/backup

This way, /data/backup is essentially just a redirect to /bigdata/backup; it's space on disk is negligible.

1
  • Instead of rm -r /data/backup, I'd suggest rmdir /data/backup, just in case something went wrong in the mv step, like forgetting some important dotfiles. rmdir will refuse to work if there is anything left in /data/backup, which is probably what you want.
    – amalloy
    May 7, 2014 at 18:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .