Directories we should not include in backing up a Linux server

1152350 pts.
Tags:
Backup
Linux
My team backs up a Linux server and it's storing it on another server. Here's what we have for code:
rsync -aPh --del server.example.com:/ /mnt/backup
But a friend (who's on another team) says we shouldn't back up /proc because we don't want to restore the /proc on the server. Is there anything else we shouldn't include? Thank you.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

In general you would probably want to exclude /proc, /dev, /sys.  Other directories could be of interest to you depending on the  server configuration.

If you think there is something else you can safely exclude, test it.  Backup your server excluding it and try to restore from that backup.  If it works, then you know the excluded directories were actually unnecessary.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • NitinIND
    Hi ,

    Use below Command .

    $ rsync -avz --exclude-from 'exclude-list.txt' source/ destination/


    and In exclude-list.txt file mention the directory and files of which U don't want to take backup .

    #cat exclude-list.txt
    /proc
    /tmp


    Also I want to suggest ,Instead to taking to all directory  take only those directory which contain critical file.
    Like 
    /Opt:--  Third Party Software  Binary
    /Var :--  Older system Logs file
    /(Specific partition) :--- Any other directory which contain critical data. 
    /etc  :-- System configuration file . 


    Backup of /tmp is not  necessary . This will save some backup space .

    200 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: