There are many ways to backup an Alfresco system. It is important that you backup the database as well as the content store. You may also want to back up the Solr indices.
Assuming you installed using the binary installer, and everything lives in $ALRESCO_HOME, you can backup the database like this:
./pg_dump alfresco --user alfresco > $ALFRESCO_HOME/alf_data/db-backup.sql
. You might be prompted for a password. It should be the same thing as the admin password you provided during installation. If not, check $ALFRESCO_HOME/tomcat/shared/classes/alfresco-global.properties for the database password.Now you have your database backed up. It is important to do that first. The next step is to backup the content store.
tar czvf ~/alfresco-backup.tar.gz .
.The content of that TAR file now has everything you need to restore your working system.