File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ mkswap /swapfile
77swapon /swapfile
88echo ' /swapfile none swap sw 0 0' >> /etc/fstab
99
10- mkdir -p /home/ec2-user/logs
10+ mkdir -p /home/ec2-user/logs/backup
1111mkdir -p /home/ec2-user/mysql
1212mkdir -p /home/ec2-user/scripts
1313
14+ chown -R ec2-user:ec2-user /home/ec2-user/logs /home/ec2-user/mysql /home/ec2-user/scripts
15+
1416aws s3 cp s3://eatda-storage-dev/scripts/app-backup-dev-logs.sh /home/ec2-user/scripts/app-backup-dev-logs.sh
1517chmod +x /home/ec2-user/scripts/app-backup-dev-logs.sh
1618
2729
2830(
2931 sudo crontab -u ec2-user -l 2> /dev/null || true
30- echo " 0 0 * * 0 /home/ec2-user/scripts/app-backup-dev-logs.sh >> /var/log /app-backup.log 2>&1"
31- echo " 30 0 * * 0 /home/ec2-user/scripts/mysql-backup.sh >> /var/log /mysql-backup.log 2>&1"
32+ echo " 0 0 * * 0 /home/ec2-user/scripts/app-backup-dev-logs.sh >> /home/ec2-user/logs/backup /app-backup.log 2>&1"
33+ echo " 30 0 * * 0 /home/ec2-user/scripts/mysql-backup.sh >> /home/ec2-user/logs/backup /mysql-backup.log 2>&1"
3234) | sudo crontab -u ec2-user -
3335
Original file line number Diff line number Diff line change @@ -7,9 +7,11 @@ mkswap /swapfile
77swapon /swapfile
88echo ' /swapfile none swap sw 0 0' >> /etc/fstab
99
10- mkdir -p /home/ec2-user/logs
10+ mkdir -p /home/ec2-user/logs/backup
1111mkdir -p /home/ec2-user/scripts
1212
13+ chown -R ec2-user:ec2-user /home/ec2-user/logs /home/ec2-user/scripts
14+
1315aws s3 cp s3://eatda-storage-prod/scripts/app-backup-prod-logs.sh /home/ec2-user/scripts/app-backup-prod-logs.sh
1416chmod +x /home/ec2-user/scripts/app-backup-prod-logs.sh
1517
2325
2426(
2527 sudo crontab -u ec2-user -l 2> /dev/null || true
26- echo " 0 0 * * 0 /home/ec2-user/scripts/app-backup-prod-logs.sh >> /home/ec2-user/logs/app-backup.log 2>&1"
28+ echo " 0 0 * * 0 /home/ec2-user/scripts/app-backup-prod-logs.sh >> /home/ec2-user/logs/backup /app-backup.log 2>&1"
2729) | sudo crontab -u ec2-user -
You can’t perform that action at this time.
0 commit comments